<template>
	<div v-if="userPromise != 1 || userPromise === undefined">
        <!-- 操作按钮 -->
        <div class="operatBtnWrapper">
            <button class="operatBtn marR5" @click.stop="add('form')" v-if="!form.id" :disabled="!isFormOk" :class="{notAllowed:!isFormOk}">确认新建</button>
            <button class="operatBtn marR5" @click.stop="edit('form')" v-else :disabled="!isFormOk" :class="{notAllowed:!isFormOk}">确认修改</button>
            <button class="operatBtn marR5" type="reset" @click.stop="resetForm('form')">重置内容</button>
        </div>
    <!-- 表单 -->
		<el-form ref="form" :model="form" :rules="rules" class="paddLR20 marT10" :inline="true" hide-required-asterisk=true label-width="70px">
            <el-row>
                <el-col :span="8">
                    <el-form-item label="工号" prop="staffNum">
                        <el-input v-model.trim="form.staffNum" class="inputTxtWrapper" placeholder="请输入工号" maxlength='6' @blur = "queryStaffNumRepeat" @input.stop.native="watchFrmChange('form')"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="职位" prop="posId">
                        <el-select v-model="form.posId" placeholder="请选择" class="inputTxtWrapper" filterable :disabled="userPromise === 1" @change="watchFrmChange('form')">
                            <el-option
                            v-for="item in posList"
                            :key="item.id"
                            :label="item.pos_name"
                            :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="8">
                    <el-form-item label="部门" prop="departId">
                        <el-select v-model="form.departId" placeholder="请选择" class="inputTxtWrapper" filterable :disabled="userPromise === 1" @change="watchFrmChange('form')">
                            <el-option
                            v-for="item in departs"
                            :key="item.id"
                            :label="item.depart_name"
                            :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
            </el-row>
		</el-form>

	</div>

    <!-- 履历页面 -->
    <div v-else  class="marLR20">
        <div class="tableWrapper marT20 padd20">
            <el-row :gutter="20">
                <el-tag class="marBT10" :type="isUserPhotoShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getUserPhoto">照片</el-tag>
                <el-tag class="marBT10" :type="isIncumInfoShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getIncumInfo">在职信息</el-tag>
                <el-tag class="marBT10" :type="isBaseMsgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getBaseMsg">基本信息</el-tag>
                <el-tag class="marBT10" :type="isFundSocialShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getFundSocial">公积金与社保</el-tag>
                <el-tag class="marBT10" :type="isFamMemberShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getFamMember">紧急联系人</el-tag>
                <el-tag class="marBT10" :type="isEduExperShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getEduExper">教育经历</el-tag>
                <el-tag class="marBT10" :type="isRewardsShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getRewards">奖惩记录</el-tag>
                <el-tag class="marBT10" :type="isPostTransShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPostTrans">调岗记录</el-tag>
                <el-tag class="marBT10" :type="isUserStatusShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getUserStatus">人员状态记录</el-tag>
                <el-tag class="marBT10" :type="isOccGradeShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getOccGrade">职业等级记录</el-tag>
                <el-tag class="marBT10" :type="isCardNumImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(2)">身份证图片</el-tag>
                <el-tag class="marBT10" :type="isResumeImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(1)">简历图片</el-tag>
                <el-tag class="marBT10" :type="isLeavingImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(4)">离职图片</el-tag>
                <el-tag class="marBT10" :type="isCerImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(3)">职称证书图片</el-tag>
                <el-tag class="marBT10" :type="isEduCerImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(6)">学历证书图片</el-tag>
                <el-tag class="marBT10" :type="isBankCardImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(7)">建行卡图片</el-tag>
                <el-tag class="marBT10" :type="isDriverImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(8)">驾驶证图片</el-tag>
                <el-tag class="marBT10" :type="isDrivingImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(9)">行驶证图片</el-tag>
                <el-tag class="marBT10" :type="isTrafficImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(10)">交强险图片</el-tag>
                <el-tag class="marBT10" :type="isCommercialImgShow ? '' : 'warning'" style="cursor:pointer;" @click.stop.native="getPics(11)">商业险图片</el-tag>
            </el-row>
        </div>


        <div class="marBT20">
            <!-- 照片与简历 -->
            <el-row :gutter="20" class="posRelative marB20"  v-show="isUserPhotoShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="avatar-uploader"
                                :show-file-list="false"
                                :before-upload="beforeupload">
                                <img v-if="imageUrl" :src="imageUrl" class="avatar">
                                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                            </el-upload>
                            <div>
                                <div class="el-upload__tip">只能上传jpg、jpeg、png图片，且不超过500kb</div>
                                <button class="operatBtn marT20" @click.stop="submitPhoto" :disabled="paramFile === null ? true : false" :class="{notAllowed:paramFile === null }">确认上传</button>
                            </div>
                        </div>
                </el-col>
            </el-row>

            <!-- 在职信息 -->
            <el-row class="posRelative marBT20" :class="{paddB60 : isIncumInfoShow}" v-show="isIncumInfoShow">
                <el-col :span="24">
                    <el-form ref="incumInfo" :model="incumInfo" :rules="incumInfoRules"  class="marT10" :inline="true" hide-required-asterisk=true label-width="82px">
                        <el-row>
                            <el-col :span="8">
                                <el-form-item label="工号" prop="staffNum">
                                        <p class="ellipsis" :title="incumInfo.staffNum" v-show="!isShowStaffNumInput">{{incumInfo.staffNum}}</p>
                                        <el-input v-model.trim="incumInfo.staffNum" v-show="isShowStaffNumInput" placeholder="请输入工号" maxlength='6' class="inputTxtWrapper" @input.stop.native="watchFrmChange('incumInfo')"></el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="8">
                                <el-form-item label="部门" prop="depart">
                                        <p class="ellipsis" :title="incumInfo.depart">{{incumInfo.depart}}</p>
                                    </el-form-item>
                            </el-col>
                            <el-col :span="8">
                                <el-form-item label="职位" prop="posName">
                                        <p class="ellipsis" :title="incumInfo.posName">{{incumInfo.posName}}</p>
                                    </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>

                    <div>
                        <button class="operatBtn" @click.stop="isShowStaffNumInput = true" v-show="!isShowStaffNumInput">修改</button>
                        <button class="operatBtn" @click.stop="cancelChangeStaffNum" v-show="isShowStaffNumInput">取消</button>
                        <button class="operatBtn" @click.stop="updateStaffNum" v-show="isShowStaffNumInput" :disabled="!isIncumInfoOk" :class="{notAllowed:!isIncumInfoOk}">确认修改</button>	
                    </div>

                </el-col>
            </el-row>

            <!-- 基本信息 -->
            <el-row class="posRelative marBT20" v-show="isBaseMsgShow">
                <div>
                    <!-- 基本信息文本 -->
                    <el-col :span="24" v-show="!isBaseFrmShow">
                            <el-form ref="baseMsgFrm" :model="baseMsgFrm" class="marT10" :inline="true" hide-required-asterisk=true label-width="82px">
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="姓名" prop="userName">
                                            <p class="ellipsis" :title="baseMsgFrm.userName">{{baseMsgFrm.userName}}</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="性别" prop="userSex">
                                            <p title="男" v-if="baseMsgFrm.userSex === 1">男</p>
                                            <p title="女" v-else>女</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="出生日期" prop="userBirth">
                                            <p class="ellipsis" :title="baseMsgFrm.userBirth">{{baseMsgFrm.userBirth}}</p>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="政治面貌" prop="politicalOutlook">
                                            <p class="ellipsis" title="中共党员" v-if="baseMsgFrm.politicalOutlook === 1">中共党员</p>
                                            <p class="ellipsis" title="中共预备党员"  v-else-if="baseMsgFrm.politicalOutlook === 2">中共预备党员</p>
                                            <p class="ellipsis" title="共青团员"  v-else-if="baseMsgFrm.politicalOutlook === 3">共青团员</p>
                                            <p class="ellipsis" title="民革党员"  v-else-if="baseMsgFrm.politicalOutlook === 4">民革党员</p>
                                            <p class="ellipsis" title="民盟盟员"  v-else-if="baseMsgFrm.politicalOutlook === 5">民盟盟员</p>
                                            <p class="ellipsis" title="民建会员"  v-else-if="baseMsgFrm.politicalOutlook === 6">民建会员</p>
                                            <p class="ellipsis" title="民进会员"  v-else-if="baseMsgFrm.politicalOutlook === 7">民进会员</p>
                                            <p class="ellipsis" title="农工党党员"  v-else-if="baseMsgFrm.politicalOutlook === 8">农工党党员</p>
                                            <p class="ellipsis" title="致公党党员"  v-else-if="baseMsgFrm.politicalOutlook === 9">致公党党员</p>
                                            <p class="ellipsis" title="九三学社社员"  v-else-if="baseMsgFrm.politicalOutlook === 10">九三学社社员</p>
                                            <p class="ellipsis" title="台盟盟员"  v-else-if="baseMsgFrm.politicalOutlook === 11">台盟盟员</p>
                                            <p class="ellipsis" title="无党派人士"  v-else-if="baseMsgFrm.politicalOutlook === 12">无党派人士</p>
                                            <p class="ellipsis" title="群众"  v-else-if="baseMsgFrm.politicalOutlook === 13">群众</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="婚姻状况" prop="maritalStatus">
                                            <p title="未婚" v-if="baseMsgFrm.maritalStatus === 1">未婚</p>
                                            <p title="已婚" v-else-if="baseMsgFrm.maritalStatus === 2">已婚</p>
                                            <p title="其它" v-else-if="baseMsgFrm.maritalStatus === 3">其它</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="健康状况" prop="health">
                                            <p title="健康" v-if="baseMsgFrm.health === 1">健康</p>
                                            <p title="良好" v-else-if="baseMsgFrm.health === 2">残疾</p>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="籍贯" prop="nativePlace">
                                            <p class="ellipsis" :title="baseMsgFrm.nativePlace">{{baseMsgFrm.nativePlace}}</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="邮箱" prop="userEmail">
                                            <p class="ellipsis" :title="baseMsgFrm.userEmail">{{baseMsgFrm.userEmail === '' ? '/' : baseMsgFrm.userEmail}}</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="QQ" prop="qq">
                                            <p class="ellipsis" :title="baseMsgFrm.qq">{{baseMsgFrm.qq === '' ? '/' : baseMsgFrm.qq}}</p>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="民族" prop="nation">
                                            <p title="汉族" v-if="baseMsgFrm.nation=== 1">汉族</p>
                                            <p title="蒙古族" v-else-if="baseMsgFrm.nation=== 2">蒙古族</p>
                                            <p title="回族" v-else-if="baseMsgFrm.nation=== 3">回族</p>
                                            <p title="藏族" v-else-if="baseMsgFrm.nation=== 4">藏族</p>
                                            <p title="维吾尔族" v-else-if="baseMsgFrm.nation=== 5">维吾尔族</p>
                                            <p title="苗族" v-else-if="baseMsgFrm.nation=== 6">苗族</p>
                                            <p title="彝族" v-else-if="baseMsgFrm.nation=== 7">彝族</p>
                                            <p title="壮族" v-else-if="baseMsgFrm.nation=== 8">壮族</p>
                                            <p title="布衣族" v-else-if="baseMsgFrm.nation=== 9">布衣族</p>
                                            <p title="朝鲜族" v-else-if="baseMsgFrm.nation=== 10">朝鲜族</p>
                                            <p title="满族" v-else-if="baseMsgFrm.nation=== 11">满族</p>
                                            <p title="侗族" v-else-if="baseMsgFrm.nation=== 12">侗族</p>
                                            <p title="瑶族" v-else-if="baseMsgFrm.nation=== 13">瑶族</p>
                                            <p title="白族" v-else-if="baseMsgFrm.nation=== 14">白族</p>
                                            <p title="土家族" v-else-if="baseMsgFrm.nation=== 15">土家族</p>
                                            <p title="哈尼族" v-else-if="baseMsgFrm.nation=== 16">哈尼族</p>
                                            <p title="哈萨克族" v-else-if="baseMsgFrm.nation=== 17">哈萨克族</p>
                                            <p title="傣族" v-else-if="baseMsgFrm.nation=== 18">傣族</p>
                                            <p title="黎族" v-else-if="baseMsgFrm.nation=== 19">黎族</p>
                                            <p title="傈僳族" v-else-if="baseMsgFrm.nation=== 20">傈僳族</p>
                                            <p title="佤族" v-else-if="baseMsgFrm.nation=== 21">佤族</p>
                                            <p title="畲族" v-else-if="baseMsgFrm.nation=== 22">畲族</p>
                                            <p title="高山族" v-else-if="baseMsgFrm.nation=== 23">高山族</p>
                                            <p title="拉祜族" v-else-if="baseMsgFrm.nation=== 24">拉祜族</p>
                                            <p title="水族" v-else-if="baseMsgFrm.nation=== 25">水族</p>
                                            <p title="东乡族" v-else-if="baseMsgFrm.nation=== 26">东乡族</p>
                                            <p title="纳西族" v-else-if="baseMsgFrm.nation=== 27">纳西族</p>
                                            <p title="景颇族" v-else-if="baseMsgFrm.nation=== 28">景颇族</p>
                                            <p title="柯尔克孜" v-else-if="baseMsgFrm.nation=== 29">柯尔克孜</p>
                                            <p title="土族" v-else-if="baseMsgFrm.nation=== 30">土族</p>
                                            <p title="达斡尔族" v-else-if="baseMsgFrm.nation=== 31">达斡尔族</p>
                                            <p title="仫佬族" v-else-if="baseMsgFrm.nation=== 32">仫佬族</p>
                                            <p title="羌族" v-else-if="baseMsgFrm.nation=== 33">羌族</p>
                                            <p title="布朗族" v-else-if="baseMsgFrm.nation=== 34">布朗族</p>
                                            <p title="撒拉族" v-else-if="baseMsgFrm.nation=== 35">撒拉族</p>
                                            <p title="毛难族" v-else-if="baseMsgFrm.nation=== 36">毛难族</p>
                                            <p title="仡佬族" v-else-if="baseMsgFrm.nation=== 37">仡佬族</p>
                                            <p title="锡伯族" v-else-if="baseMsgFrm.nation=== 38">锡伯族</p>
                                            <p title="阿昌族" v-else-if="baseMsgFrm.nation=== 39">阿昌族</p>
                                            <p title="普米族" v-else-if="baseMsgFrm.nation=== 40">普米族</p>
                                            <p title="塔吉克族" v-else-if="baseMsgFrm.nation=== 41">塔吉克族</p>
                                            <p title="怒族" v-else-if="baseMsgFrm.nation=== 42">怒族</p>
                                            <p title="乌孜别克" v-else-if="baseMsgFrm.nation=== 43">乌孜别克</p>
                                            <p title="俄罗斯族" v-else-if="baseMsgFrm.nation=== 44">俄罗斯族</p>
                                            <p title="鄂温克族" v-else-if="baseMsgFrm.nation=== 45">鄂温克族</p>
                                            <p title="崩龙族" v-else-if="baseMsgFrm.nation=== 46">崩龙族</p>
                                            <p title="保安族" v-else-if="baseMsgFrm.nation=== 47">保安族</p>
                                            <p title="裕固族" v-else-if="baseMsgFrm.nation=== 48">裕固族</p>
                                            <p title="京族" v-else-if="baseMsgFrm.nation=== 49">京族</p>
                                            <p title="塔塔尔族" v-else-if="baseMsgFrm.nation=== 50">塔塔尔族</p>
                                            <p title="独龙族" v-else-if="baseMsgFrm.nation=== 51">独龙族</p>
                                            <p title="鄂伦春族" v-else-if="baseMsgFrm.nation=== 52">鄂伦春族</p>
                                            <p title="赫哲族" v-else-if="baseMsgFrm.nation=== 53">赫哲族</p>
                                            <p title="门巴族" v-else-if="baseMsgFrm.nation=== 54">门巴族</p>
                                            <p title="珞巴族" v-else-if="baseMsgFrm.nation=== 55">珞巴族</p>
                                            <p title="基诺族" v-else-if="baseMsgFrm.nation=== 56">基诺族</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="职称" prop="userTitle">
                                            <p class="ellipsis" :title="baseMsgFrm.userTitle">{{baseMsgFrm.userTitle === '' ? '/' : baseMsgFrm.userTitle}}</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="联系电话" prop="userTel">
                                            <p class="ellipsis" :title="baseMsgFrm.userTel">{{baseMsgFrm.userTel}}</p>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="身份证号" prop="userCardNo">
                                            <p class="ellipsis" :title="baseMsgFrm.userCardNo">{{baseMsgFrm.userCardNo}}</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="户籍地址" prop="perAddress">
                                            <p class="ellipsis" :title="baseMsgFrm.perAddress">{{baseMsgFrm.perAddress}}</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="常住地址" prop="concatAddress">
                                            <p class="ellipsis" :title="baseMsgFrm.concatAddress">{{baseMsgFrm.concatAddress}}</p>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="毕业院校" prop="gradSchool">
                                            <p class="ellipsis" :title="baseMsgFrm.gradSchool">{{baseMsgFrm.gradSchool}}</p>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="毕业时间" prop="gradTime">
                                            <p class="ellipsis" :title="baseMsgFrm.gradTime">{{baseMsgFrm.gradTime}}</p>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>
                            <div>
                                <button class="operatBtn" @click.stop="isBaseFrmShow = true">修改</button>
                            </div>
                    </el-col>
                    <!-- 基本信息表单 -->
                    <el-col :span="24" v-show="isBaseFrmShow">
                            <el-form ref="baseMsgFrm" :model="baseMsgFrm"  :rules="baseMsgFrmRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="82px">
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="姓名" prop="userName">
                                            <el-input v-model.trim="baseMsgFrm.userName" placeholder="请输入姓名" maxlength='10' class="inputTxtWrapper" @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="性别" prop="userSex">
                                            <el-select v-model="baseMsgFrm.userSex" placeholder="请选择" class="inputTxtWrapper" @change="watchFrmChange('baseMsgFrm')">
                                                <el-option
                                                    v-for="item in sex"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="出生日期" prop="userBirth">
                                            <el-input v-model.trim="baseMsgFrm.userBirth" class="inputTxtWrapper" readonly="true"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="政治面貌" prop="politicalOutlook">
                                            <el-select v-model="baseMsgFrm.politicalOutlook" placeholder="请选择政治面貌"  class="inputTxtWrapper" @change="watchFrmChange('baseMsgFrm')">
                                                <el-option
                                                    v-for="item in outlook"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="婚姻状况" prop="maritalStatus">
                                            <el-select v-model="baseMsgFrm.maritalStatus" placeholder="请选择婚姻状况" class="inputTxtWrapper" @change="watchFrmChange('baseMsgFrm')">
                                                <el-option
                                                    v-for="item in maritalStatus"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="健康状况" prop="health">
                                            <el-select v-model="baseMsgFrm.health" placeholder="请选择健康状况" class="inputTxtWrapper" @change="watchFrmChange('baseMsgFrm')">
                                                <el-option
                                                    v-for="item in health"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="籍贯" prop="nativePlace">
                                            <el-input v-model.trim="baseMsgFrm.nativePlace" placeholder="请输入籍贯" maxlength='20' class="inputTxtWrapper" @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="邮箱" prop="userEmail">
                                            <el-input v-model.trim="baseMsgFrm.userEmail" placeholder="请输入邮箱" maxlength='50' class="inputTxtWrapper" @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="QQ" prop="qq">
                                            <el-input v-model.trim.number="baseMsgFrm.qq" placeholder="请输入QQ" maxlength='10' class="inputTxtWrapper" @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="民族" prop="nation">
                                            <el-select v-model="baseMsgFrm.nation" placeholder="请选择民族"  class="inputTxtWrapper" @change="watchFrmChange('baseMsgFrm')">
                                                <el-option
                                                    v-for="item in nation"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="职称" prop="userTitle">
                                            <el-input v-model.trim="baseMsgFrm.userTitle" placeholder="请输入职称" maxlength='15' class="inputTxtWrapper"  @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="联系电话" prop="userTel">
                                            <el-input v-model.trim="baseMsgFrm.userTel" placeholder="多个电话以，分隔" maxlength='100' class="inputTxtWrapper"  @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="身份证号" prop="userCardNo">
                                            <el-input v-model.trim="baseMsgFrm.userCardNo" placeholder="请输入身份证号" maxlength='18' class="inputTxtWrapper"  @blur.stop="changeUserBirth"  @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="户籍地址" prop="perAddress">
                                            <el-input v-model.trim="baseMsgFrm.perAddress" placeholder="请输入户籍所在地" maxlength='50' class="inputTxtWrapper"  @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="常住地址" prop="concatAddress">
                                            <el-input v-model.trim="baseMsgFrm.concatAddress" placeholder="请输入常住地址" maxlength='50' class="inputTxtWrapper"  @input.stop.native="watchFrmChange('baseMsgFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>
                            <div>
                                <button class="operatBtn" @click.stop="cancelEditBaseMsg">取消</button>
                                <button class="operatBtn" @click.stop="submitBaseMsg" :disabled="!isBaseMsgFrmOk" :class="{notAllowed:!isBaseMsgFrmOk}">确认修改</button>
                            </div>
                    </el-col>
                </div>
            </el-row>

            <!-- 公积金与社保 -->
            <el-row class="posRelative marBT20" v-show="isFundSocialShow">
                <div>
                    <!-- 公积金与社保文本 -->
                    <el-col :span="24" v-show="!isFundSocialFrmShow">
                        <el-form ref="fundSocialFrm" :model="fundSocialFrm" class="marT10" :inline="true" hide-required-asterisk=true label-width="82px">
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="历史社保" prop="existWorkingAge">
                                        <p class="ellipsis" :title="fundSocialFrm.existWorkingAge === '' ? '/' : fundSocialFrm.existWorkingAge">{{fundSocialFrm.existWorkingAge === '' ? '/' : fundSocialFrm.existWorkingAge}}</p>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="本司社保" prop="comSocialSec">
                                        <p class="ellipsis" :title="fundSocialFrm.comSocialSec">{{fundSocialFrm.comSocialSec}}</p>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="本司工龄" prop="comWorkingTime">
                                        <p class="ellipsis" :title="fundSocialFrm.comWorkingTime">{{fundSocialFrm.comWorkingTime}}</p>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="8">
                                    <el-form-item label="社保期数" prop="totalWorkingTime">
                                        <p class="ellipsis" :title="fundSocialFrm.totalWorkingTime === '' ? '/' : fundSocialFrm.totalWorkingTime">{{fundSocialFrm.totalWorkingTime === '' ? '/' : fundSocialFrm.totalWorkingTime}}</p>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item label="公积金账号" prop="fundAccount">
                                        <p class="ellipsis" :title="fundSocialFrm.fundAccount === '' ? '/' : fundSocialFrm.fundAccount">{{fundSocialFrm.fundAccount === '' ? '/' : fundSocialFrm.fundAccount}}</p>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-form>
                        <div>
                            <button class="operatBtn" @click.stop="isFundSocialFrmShow = true">修改</button>
                        </div>
                    </el-col>
                    <!-- 公积金与社保表单 -->
                    <el-col :span="24" v-show="isFundSocialFrmShow">
                            <el-form ref="fundSocialFrm" :model="fundSocialFrm"  :rules="fundSocialFrmRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="82px">
                                <el-row>
                                    <el-col :span="8">
                                        <el-form-item label="历史社保" prop="existWorkingAge">
                                            <el-input v-model.trim.number="fundSocialFrm.existWorkingAge" placeholder="请输入历史社保" maxlength='3' class="inputTxtWrapper" @input.stop.native="watchFrmChange('fundSocialFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8">
                                        <el-form-item label="公积金账号" prop="fundAccount">
                                            <el-input v-model.trim="fundSocialFrm.fundAccount" placeholder="请输入公积金账号" maxlength='12' class="inputTxtWrapper" @input.stop.native="watchFrmChange('fundSocialFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>
                            <div>
                                <button class="operatBtn" @click.stop="cancelFundSocial">取消</button>
                                <button class="operatBtn" @click.stop="submitFundSocial" :disabled="!isFundSocialFrmOk" :class="{notAllowed:!isFundSocialFrmOk}">确认修改</button>
                            </div>
                    </el-col>
                </div>
            </el-row>

            <!-- 紧急联系人 -->
            <el-row class="posRelative marBT20" v-show="isFamMemberShow">
                <el-col :span="24">
                        <div>
                            <!-- 新增紧急联系人 -->
                            <el-form ref="memberFrm" :model="memberFrm" :rules="memberRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="80px" v-show="isMemberFrmShow">
                                <el-row>
                                    <el-col :span="8" :lg="8" :md="12">
                                        <el-form-item label="称呼" prop="memberCall">
                                            <el-input v-model.trim="memberFrm.memberCall" placeholder="请输入称呼" maxlength='4' class="inputTxtWrapper" @input.stop.native="watchFrmChange('memberFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8" :lg="8" :md="12">
                                        <el-form-item label="姓名" prop="memberName">
                                            <el-input v-model.trim="memberFrm.memberName" placeholder="请输入姓名" maxlength='10' class="inputTxtWrapper" @input.stop.native="watchFrmChange('memberFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8" :lg="8" :md="12">
                                        <el-form-item label="电话" prop="memberTel">
                                            <el-input v-model.trim="memberFrm.memberTel" placeholder="多个电话以，分隔" maxlength='50' class="inputTxtWrapper" @input.stop.native="watchFrmChange('memberFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>

                            <!-- 紧急联系人列表 -->
                            <div class="marB20 font14" v-show="!isMemberFrmShow && memberList.length > 0">
                                <el-row class="headerRowClass borderT1">
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1">称呼</p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1">姓名</p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1">电话</p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1 borderR1">操作</p>
                                    </el-col>
                                </el-row>
                                <el-row class="rowClass borderT1 tdText" v-for="(item,index) of memberList" :key="item.memberId" :index="index">
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1 ellipsis">{{item.memberCall}}</p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1 ellipsis">{{item.memberName}}</p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1 ellipsis">{{item.memberTel}}</p>
                                    </el-col>
                                    <el-col :span="6">
                                        <p class="paddTB10 tContent borderL1 borderR1">
                                            <icon name="change" class="scaleIcon1 marR15" title="修改" @click.native.stop="editShowMemberFrm(item.memberId,index)"></icon>
                                            <icon name="del" class="scaleIcon1" title="删除" @click.native.stop="deleteMember(item.memberId,index)"></icon>
                                        </p>
                                    </el-col>
                                </el-row>
                            </div>

                            <div class="tipNoData" v-show="memberList.length <= 0 && !isMemberFrmShow">暂无数据</div> 

                            <div>
                                    <button class="operatBtn" @click.stop="showMemberFrm" v-show="!isMemberFrmShow">添加</button>
                                    <button class="operatBtn" @click.stop="cancel" v-show="isMemberFrmShow">取消</button>
                                    <button class="operatBtn" @click.stop="addMember" v-show="isMemberFrmShow && isAddorEdit" :disabled="!isMemberFrmOk" :class="{notAllowed:!isMemberFrmOk}">确认提交</button>
                                    <button class="operatBtn" @click.stop="editMember" v-show="isMemberFrmShow && !isAddorEdit" :disabled="!isMemberFrmOk" :class="{notAllowed:!isMemberFrmOk}">确认修改</button>
                            </div>
                        </div>
                </el-col>
            </el-row>

            <!-- 教育经历 -->
            <el-row class="posRelative marBT20" v-show="isEduExperShow">
                <el-col :span="24">
                        <div>
                            <!-- 新增教育经历 -->
                            <el-form ref="eduFrm" :model="eduFrm" :rules="eduFrmRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="80px" v-show="isEduFrmShow">
                                <el-row>
                                    <el-col :span="8" :lg="8" :md="12">
                                        <el-form-item label="学历" prop="education">
                                            <el-select v-model="eduFrm.education" placeholder="请选择" class="inputTxtWrapper"  @change="watchFrmChange('eduFrm')">
                                                <el-option
                                                    v-for="item in educationArr"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8" :lg="8" :md="12">
                                        <el-form-item label="毕业院校" prop="gradSchool">
                                            <el-input v-model.trim="eduFrm.gradSchool" placeholder="请输入毕业院校" maxlength='20' class="inputTxtWrapper"  @input.stop.native="watchFrmChange('eduFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8" :lg="8" :md="12">
                                        <el-form-item label="毕业时间" prop="gradTime">
                                            <el-date-picker
                                                class="inputTxtWrapper"
                                                v-model="eduFrm.gradTime"
                                                type="month"
                                                value-format="yyyy-MM"
                                                :editable = "false"
                                                placeholder="请选择毕业时间"
                                                @change="watchFrmChange('eduFrm')">
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="8" :lg="8" :md="12">
                                        <el-form-item label="专业" prop="professName">
                                            <el-input v-model.trim="eduFrm.professName" placeholder="多个专业以，分隔" maxlength='30' class="inputTxtWrapper"  @input.stop.native="watchFrmChange('eduFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>

                            <!-- 教育经历列表 -->
                            <div class="marB20 font14" v-show="!isEduFrmShow && eduList.length > 0">
                                <el-row class="headerRowClass borderT1">
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            学历
                                        </p>
                                    </el-col>
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1">毕业院校</p>
                                    </el-col>
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1">毕业时间</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1">专业名称</p>
                                    </el-col>
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            审核状态
                                        </p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1">审核理由</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1">操作</p>
                                    </el-col>
                                </el-row>
                                <el-row class="rowClass borderT1 tdText" v-for="(item,index) of eduList" :key="item.eduId" :index="index">
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="初中及以下" v-if="item.education === 1">初中及以下</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="高中" v-else-if="item.education === 2">高中</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="专科" v-else-if="item.education === 3">专科</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="本科(成教)" v-else-if="item.education === 4">本科(成教)</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="本科(民办 / 自考)" v-else-if="item.education === 5">本科(民办 / 自考)</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="本科(二本)" v-else-if="item.education === 6">本科(二本)</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="本科(一本)" v-else-if="item.education === 7">本科(一本)</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="本科(211)" v-else-if="item.education === 8">本科(211)</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="本科(985)" v-else-if="item.education === 9">本科(985)</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="硕士 / 工硕" v-else-if="item.education === 10">硕士 / 工硕</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="博士" v-else-if="item.education === 11">博士</p>
                                    </el-col>
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.gradSchool">{{item.gradSchool}}</p>
                                    </el-col>
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.gradSchool">{{item.gradTime}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.professName">{{item.professName}}</p>
                                    </el-col>
                                    <el-col :span="3">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="待审核" v-if="item.auditStatus === 1">待审核</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核通过" v-else-if="item.auditStatus === 2">审核通过</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核不通过" v-else-if="item.auditStatus === 3">审核不通过</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.auditFailReason">{{item.auditFailReason}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1" v-if="item.auditStatus === 2">
                                            /
                                        </p>
                                        <p class="paddTB10 tContent borderL1 borderR1" v-else>
                                            <icon name="change" class="scaleIcon1 marR15" title="修改" @click.native.stop="editShowEduFrm(item.eduId,index)"></icon>
                                            <icon name="del" class="scaleIcon1 marR15" title="删除" @click.native.stop="deleteEdu(item.eduId,index)"></icon>
                                            <icon name="examine" class="scaleIcon1" title="审核" @click.native.stop="examineEdu(item.eduId,index)" :class="{hideIcon:item.auditStatus !== 1}"></icon>
                                        </p>
                                    </el-col>
                                </el-row>
                            </div>

                            <div class="tipNoData" v-show="eduList.length <= 0 && !isEduFrmShow">暂无数据</div> 

                            <div>
                                    <button class="operatBtn" @click.stop="showEduFrm" v-show="!isEduFrmShow">添加</button>
                                    <button class="operatBtn" @click.stop="cancelEduFrm" v-show="isEduFrmShow">取消</button>
                                    <button class="operatBtn" @click.stop="addEdu" v-show="isEduFrmShow && isAddorEditEduBtn" :disabled="!isEduFrmOk" :class="{notAllowed:!isEduFrmOk}">确认提交</button>
                                    <button class="operatBtn" @click.stop="editEdu" v-show="isEduFrmShow && !isAddorEditEduBtn" :disabled="!isEduFrmOk" :class="{notAllowed:!isEduFrmOk}">确认修改</button>
                            </div>
                        </div>
                </el-col>
            </el-row>
            
            <!-- 奖惩记录 -->
            <el-row class="posRelative marBT20" v-show="isRewardsShow">
                <el-col :span="24">
                        <div>
                            <!-- 新增奖惩记录 -->
                            <el-form ref="rewardFrm" :model="rewardFrm" :rules="rewardFrmRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="80px" v-show="isRewardFrmShow">
                                <el-row>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="文件编号" prop="fileNum">
                                            <el-input v-model.trim="rewardFrm.fileNum" placeholder="请输入文件编号" maxlength='20' class="inputTxtWrapper" @input.stop.native="watchFrmChange('rewardFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label=" 奖惩类型" prop="rewardsType">
                                            <el-select v-model="rewardFrm.rewardsType" placeholder="请选择" class="inputTxtWrapper"  @change="watchFrmChange('rewardFrm')">
                                                <el-option
                                                    v-for="item in rewardsArr"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="奖惩金额" prop="rewardsMoney">
                                            <el-input v-model.trim.number="rewardFrm.rewardsMoney" placeholder="请输入奖惩金额" maxlength='6' class="inputTxtWrapper" @input.stop.native="watchFrmChange('rewardFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="奖惩原因" prop="rewardsReason">
                                            <el-input v-model.trim="rewardFrm.rewardsReason" placeholder="请输入奖惩原因" maxlength='30' class="inputTxtWrapper" @input.stop.native="watchFrmChange('rewardFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="奖惩日期" prop="rewardsTime">
                                            <el-date-picker
                                                class="inputTxtWrapper"
                                                v-model="rewardFrm.rewardsTime"
                                                type="date"
                                                value-format="yyyy-MM-dd"
                                                :editable = "false"
                                                placeholder="请选择奖惩日期"
                                                @change="watchFrmChange('rewardFrm')">
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>

                            <!-- 奖惩记录 -->
                            <div class="marB20 font14" v-show="!isRewardFrmShow && rewardList.length > 0">
                                <el-row class="headerRowClass borderT1">
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            文件编号
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            奖惩类型
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            奖惩日期
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1">奖惩金额</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1">奖惩原因</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            审核状态
                                        </p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1">审核理由</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1">操作</p>
                                    </el-col>
                                </el-row>
                                <el-row class="rowClass borderT1 tdText" v-for="(item,index) of rewardList" :key="item.rewardId" :index="index">
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.fileNum">{{item.fileNum}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="奖励" v-if="item.rewardsType === 1">奖励</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="口头警告" v-else-if="item.rewardsType === 2">口头警告</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="书面警告" v-else-if="item.rewardsType === 3">书面警告</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="一类事故" v-else-if="item.rewardsType === 4">一类事故</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="二类事故" v-else-if="item.rewardsType === 5">二类事故</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="三类事故" v-else-if="item.rewardsType === 6">三类事故</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="四类事故" v-else-if="item.rewardsType === 7">四类事故</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="五类事故" v-else-if="item.rewardsType === 8">五类事故</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="六类事故" v-else-if="item.rewardsType === 9">六类事故</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.rewardsTime">{{item.rewardsTime}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.rewardsMoney">{{item.rewardsMoney}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.rewardsReason">{{item.rewardsReason}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="待审核" v-if="item.auditStatus === 1">待审核</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核通过" v-else-if="item.auditStatus === 2">审核通过</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核不通过" v-else-if="item.auditStatus === 3">审核不通过</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.auditFailReason">{{item.auditFailReason}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1" v-if="item.auditStatus === 2">
                                            /
                                        </p>
                                        <p class="paddTB10 tContent borderL1 borderR1" v-else>
                                            <icon name="change" class="scaleIcon1 marR15" title="修改" @click.native.stop="editShowRewardFrm(item.rewardId,index)"></icon>
                                            <icon name="del" class="scaleIcon1 marR15" title="删除" @click.native.stop="deleteReward(item.rewardId,index)"></icon>
                                            <icon name="examine" class="scaleIcon1" title="审核" @click.native.stop="examineReward(item.rewardId,index)" :class="{hideIcon:item.auditStatus !== 1}"></icon>
                                        </p>
                                    </el-col>
                                </el-row>
                            </div>

                            <div class="tipNoData" v-show="rewardList.length <= 0 && !isEduFrmShow">暂无数据</div> 
                            <div>
                                    <button class="operatBtn" @click.stop="showRewardFrm" v-show="!isRewardFrmShow">添加</button>
                                    <button class="operatBtn" @click.stop="cancelRewardFrm" v-show="isRewardFrmShow">取消</button>
                                    <button class="operatBtn" @click.stop="addReward" v-show="isRewardFrmShow && isAddorEditRewardBtn" :disabled="!isRewardFrmOk" :class="{notAllowed:!isRewardFrmOk}">确认提交</button>
                                    <button class="operatBtn" @click.stop="editReward" v-show="isRewardFrmShow && !isAddorEditRewardBtn" :disabled="!isRewardFrmOk" :class="{notAllowed:!isRewardFrmOk}">确认修改</button>
                            </div>
                        </div>
                </el-col>
            </el-row>
            
            <!-- 调岗记录 -->
            <el-row class="posRelative marBT20" v-show="isPostTransShow">
                <el-col :span="24">
                        <div>
                            <!-- 新增调岗记录 -->
                            <el-form ref="postTransFrm" :model="postTransFrm" :rules="postTransFrmRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="80px" v-show="isPostTransFrmShow">
                                <el-row>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="文件编号" prop="fileNum">
                                            <el-input v-model.trim="postTransFrm.fileNum" placeholder="请输入文件编号" maxlength='20' class="inputTxtWrapper"  @input.stop.native="watchFrmChange('postTransFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="原部门" prop="oldDepartName">
                                            {{postTransFrm.oldDepartName}}
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="原职位" prop="oldPostName">
                                            {{postTransFrm.oldPostName}}
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="调岗编号" prop="postAdjustNum">
                                            <el-input v-model.trim="postTransFrm.postAdjustNum" placeholder="请输入调岗编号" maxlength='20' class="inputTxtWrapper" @input.stop.native="watchFrmChange('postTransFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="新部门" prop="newDepartId">
                                            <el-select v-model="postTransFrm.newDepartId" placeholder="请选择" class="inputTxtWrapper" @change="selNewDepart">
                                                <el-option
                                                    v-for="item in departs"
                                                    :key="item.id"
                                                    :label="item.depart_name"
                                                    :value="item.id">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="新职位" prop="newPostId">
                                            <el-select v-model="postTransFrm.newPostId" placeholder="请选择" class="inputTxtWrapper" @change="selNewPos">
                                                <el-option
                                                    v-for="item in posList"
                                                    :key="item.id"
                                                    :label="item.pos_name"
                                                    :value="item.id">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="调岗日期" prop="postAdjustTime">
                                            <el-date-picker
                                                class="inputTxtWrapper"
                                                v-model="postTransFrm.postAdjustTime"
                                                type="date"
                                                value-format="yyyy-MM-dd"
                                                :editable = "false"
                                                placeholder="请选择调岗日期"
                                                @change="watchFrmChange('postTransFrm')">
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="调岗原因" prop="postAdjustReason">
                                            <el-input v-model.trim="postTransFrm.postAdjustReason" placeholder="请输入调岗原因" maxlength='30' class="inputTxtWrapper" @input.stop.native="watchFrmChange('postTransFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>

                            <!-- 调岗记录 -->
                            <div class="marB20 font14" v-show="!isPostTransFrmShow && postTransList.length > 0">
                                <el-row class="headerRowClass borderT1">
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative ellipsis" title="文件编号">
                                            文件编号
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative ellipsis" title="调岗编号">
                                            调岗编号
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="原部门">
                                            原部门
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="新部门">
                                            新部门
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative ellipsis" title="原职位">
                                            原职位
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative ellipsis" title="新职位">
                                            新职位
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="调岗原因">
                                            调岗原因
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="调岗时间">
                                            调岗时间
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 posRelative ellipsis" title="审核状态">
                                            审核状态
                                        </p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核理由">审核理由</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1 ellipsis" title="操作">操作</p>
                                    </el-col>
                                </el-row>
                                <el-row class="rowClass borderT1 tdText" v-for="(item,index) of postTransList" :key="item.postTransId" :index="index">
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.fileNum">{{item.fileNum}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.postAdjustNum">{{item.postAdjustNum}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.oldDepartName">{{item.oldDepartName}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.newDepartName">{{item.newDepartName}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.oldPostName">{{item.oldPostName}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.newPostName">{{item.newPostName}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.postAdjustReason">{{item.postAdjustReason}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.postAdjustTime">{{item.postAdjustTime}}</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="待审核" v-if="item.auditStatus === 1">待审核</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核通过" v-else-if="item.auditStatus === 2">审核通过</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核不通过" v-else-if="item.auditStatus === 3">审核不通过</p>
                                    </el-col>
                                    <el-col :span="2">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.auditFailReason">{{item.auditFailReason}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1" v-if="item.auditStatus === 2">
                                            /
                                        </p>
                                        <p class="paddTB10 tContent borderL1 borderR1" v-else>
                                            <icon name="change" class="scaleIcon1 marR15" title="修改" @click.native.stop="editShowPostTransFrm(item.postTransId,index)"></icon>
                                            <icon name="del" class="scaleIcon1 marR15" title="删除" @click.native.stop="deletePostTrans(item.postTransId,index)"></icon>
                                            <icon name="examine" class="scaleIcon1" title="审核" @click.native.stop="examinePostTrans(item.postTransId,index)" :class="{hideIcon:item.auditStatus !== 1}"></icon>
                                        </p>
                                    </el-col>
                                </el-row>
                            </div>

                            <div class="tipNoData" v-show="postTransList.length <= 0 && !isPostTransFrmShow">暂无数据</div> 

                            <div>
                                    <button class="operatBtn" @click.stop="showPostTransFrm" v-show="!isPostTransFrmShow">添加</button>
                                    <button class="operatBtn" @click.stop="cancelPostTransFrm" v-show="isPostTransFrmShow">取消</button>
                                    <button class="operatBtn" @click.stop="addPostTrans" v-show="isPostTransFrmShow && isAddorEditPostTransBtn" :disabled="!isPostTransFrmOk" :class="{notAllowed:!isPostTransFrmOk}">确认提交</button>
                                    <button class="operatBtn" @click.stop="editPostTrans" v-show="isPostTransFrmShow && !isAddorEditPostTransBtn" :disabled="!isPostTransFrmOk" :class="{notAllowed:!isPostTransFrmOk}">确认修改</button>
                            </div>
                        </div>
                </el-col>
            </el-row>
            
            <!-- 人员状态记录 -->
            <el-row class="posRelative marBT20" v-show="isUserStatusShow">
                <el-col :span="24">
                        <div>
                            <el-form ref="userStatusFrm" :model="userStatusFrm" :rules="userStatusFrmRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="80px" v-show="isUserStatusFrmShow">
                                <el-row>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="工作状态" prop="workNature">
                                            <el-select v-model="userStatusFrm.workNature" placeholder="请选择" class="inputTxtWrapper" @change="watchFrmChange('userStatusFrm')">
                                                <el-option
                                                    v-for="item in workNatureArr"
                                                    :key="item.type"
                                                    :label="item.label"
                                                    :value="item.type">
                                                </el-option>
                                            </el-select>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="开始时间" prop="eventTime">
                                            <el-date-picker
                                                class="inputTxtWrapper"
                                                v-model="userStatusFrm.eventTime"
                                                type="date"
                                                value-format="yyyy-MM-dd"
                                                :editable = "false"
                                                placeholder="请选择开始时间"
                                                @change="watchFrmChange('userStatusFrm')">
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12" v-if="userStatusFrm.workNature !==5 && userStatusFrm.workNature !==7">
                                        <el-form-item label="结束时间" prop="endEventTime">
                                            <el-date-picker
                                                class="inputTxtWrapper"
                                                v-model="userStatusFrm.endEventTime"
                                                type="date"
                                                value-format="yyyy-MM-dd"
                                                :editable = "false"
                                                placeholder="请选择结束时间"
                                                @change="watchFrmChange('userStatusFrm')">
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>

                            <div class="marB20 font14" v-show="!isUserStatusFrmShow && userStatusList.length > 0">
                                <el-row class="headerRowClass borderT1">
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            工作状态
                                        </p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1">
                                            开始时间
                                        </p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1">
                                            结束时间
                                        </p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            审核状态
                                        </p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1">审核理由</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1">操作</p>
                                    </el-col>
                                </el-row>
                                <el-row class="rowClass borderT1 tdText" v-for="(item,index) of userStatusList" :key="item.userStatusId" :index="index">
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="在校实习生" v-if="item.workNature === 1">在校实习生</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="试用" v-else-if="item.workNature === 2">试用</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="首签合同" v-else-if="item.workNature === 3">首签合同</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="续签合同" v-else-if="item.workNature === 4">续签合同</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="无固定期限合同" v-else-if="item.workNature === 5">无固定期限合同</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="停薪留职" v-else-if="item.workNature === 6">停薪留职</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="离职" v-else-if="item.workNature === 7">离职</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="退休返职" v-else-if="item.workNature === 8">退休返职</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="钟点工" v-else-if="item.workNature === 9">钟点工</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="兼职" v-else-if="item.workNature === 10">兼职</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.eventTime">{{item.eventTime}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.endEventTime">{{item.endEventTime}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="待审核" v-if="item.auditStatus === 1">待审核</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核通过" v-else-if="item.auditStatus === 2">审核通过</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核不通过" v-else-if="item.auditStatus === 3">审核不通过</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.auditFailReason">{{item.auditFailReason}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 borderR1" v-if="item.auditStatus === 2">
                                            /
                                        </p>
                                        <p class="paddTB10 tContent borderL1 borderR1" v-else>
                                            <icon name="change" class="scaleIcon1 marR15" title="修改" @click.native.stop="editShowUserStatusFrm(item.userStatusId,index)"></icon>
                                            <icon name="del" class="scaleIcon1 marR15" title="删除" @click.native.stop="deleteUserStatus(item.userStatusId,index)"></icon>
                                            <icon name="examine" class="scaleIcon1" title="审核" @click.native.stop="examineUserStatus(item.userStatusId,index)" :class="{hideIcon:item.auditStatus !== 1}"></icon>
                                        </p>
                                    </el-col>
                                </el-row>
                            </div>

                            <div class="tipNoData" v-show="userStatusList.length <= 0 && !isUserStatusFrmShow">暂无数据</div> 

                            <div>
                                <button class="operatBtn" @click.stop="showUserStatusFrm" v-show="!isUserStatusFrmShow">添加</button>
                                <button class="operatBtn" @click.stop="cancelUserStatusFrm" v-show="isUserStatusFrmShow">取消</button>
                                <button class="operatBtn" @click.stop="addUserStatus" v-show="isUserStatusFrmShow && isAddorEditUserStatusBtn" :disabled="!isUserStatusFrmOk" :class="{notAllowed:!isUserStatusFrmOk}">确认提交</button>
                                <button class="operatBtn" @click.stop="editUserStatus" v-show="isUserStatusFrmShow && !isAddorEditUserStatusBtn" :disabled="!isUserStatusFrmOk" :class="{notAllowed:!isUserStatusFrmOk}">确认修改</button>
                            </div>
                        </div>
                </el-col>
            </el-row>
            
            <!--  职业等级记录 -->
            <el-row class="posRelative marBT20" v-show="isOccGradeShow">
                <el-col :span="24">
                        <div>
                            <el-form ref="occGradeFrm" :model="occGradeFrm" :rules="occGradeFrmRules" class="marT10" :inline="true" hide-required-asterisk=true label-width="80px" v-show="isOccGradeFrmShow">
                                <el-row>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="职业等级" prop="occGradeStr">
                                            <el-input v-model.trim="occGradeFrm.occGradeStr" placeholder="请输入职业等级" maxlength='50' class="inputTxtWrapper" @input.stop.native="watchFrmChange('occGradeFrm')"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="6" :lg="8" :md="12">
                                        <el-form-item label="开始时间" prop="eventTime">
                                            <el-date-picker
                                                class="inputTxtWrapper"
                                                v-model="occGradeFrm.eventTime"
                                                type="date"
                                                value-format="yyyy-MM-dd"
                                                :editable = "false"
                                                placeholder="请选择开始时间"
                                                @change="watchFrmChange('occGradeFrm')">
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </el-form>

                            <div class="marB20 font14" v-show="!isOccGradeFrmShow && occGradeList.length > 0">
                                <el-row class="headerRowClass borderT1">
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            职业等级
                                        </p>
                                    </el-col>
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1">
                                            开始时间
                                        </p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 posRelative">
                                            审核状态
                                        </p>
                                    </el-col>
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1">审核理由</p>
                                    </el-col>
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1 borderR1">操作</p>
                                    </el-col>
                                </el-row>
                                <el-row class="rowClass borderT1 tdText" v-for="(item,index) of occGradeList" :key="item.occGradeId" :index="index">
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.occGradeStr">{{item.occGradeStr}}</p>
                                    </el-col>
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.eventTime">{{item.eventTime}}</p>
                                    </el-col>
                                    <el-col :span="4">
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="待审核" v-if="item.auditStatus === 1">待审核</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核通过" v-else-if="item.auditStatus === 2">审核通过</p>
                                        <p class="paddTB10 tContent borderL1 ellipsis" title="审核不通过" v-else-if="item.auditStatus === 3">审核不通过</p>
                                    </el-col>
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1 ellipsis" :title="item.auditFailReason">{{item.auditFailReason}}</p>
                                    </el-col>
                                    <el-col :span="5">
                                        <p class="paddTB10 tContent borderL1 borderR1" v-if="item.auditStatus === 2">
                                            /
                                        </p>
                                        <p class="paddTB10 tContent borderL1 borderR1" v-else>
                                            <icon name="change" class="scaleIcon1 marR15" title="修改" @click.native.stop="editShowOccGradeFrm(item.occGradeId,index)"></icon>
                                            <icon name="del" class="scaleIcon1 marR15" title="删除" @click.native.stop="deleteUserOccGrade(item.occGradeId,index)"></icon>
                                            <icon name="examine" class="scaleIcon1" title="审核" @click.native.stop="examineUserOccGrade(item.occGradeId,index)" :class="{hideIcon:item.auditStatus !== 1}"></icon>
                                        </p>
                                    </el-col>
                                </el-row>
                            </div>

                            <div class="tipNoData" v-show="occGradeList.length <= 0 && !isOccGradeFrmShow">暂无数据</div> 

                            <div>
                                <button class="operatBtn" @click.stop="showOccGradeFrm" v-show="!isOccGradeFrmShow">添加</button>
                                <button class="operatBtn" @click.stop="cancelOccGradeFrm" v-show="isOccGradeFrmShow">取消</button>
                                <button class="operatBtn" @click.stop="addUserOccGrade" v-show="isOccGradeFrmShow && isAddorEditOccGradeBtn" :disabled="!isOccGradeFrmOk" :class="{notAllowed:!isOccGradeFrmOk}">确认提交</button>
                                <button class="operatBtn" @click.stop="editUserOccGrade" v-show="isOccGradeFrmShow && !isAddorEditOccGradeBtn" :disabled="!isOccGradeFrmOk" :class="{notAllowed:!isOccGradeFrmOk}">确认修改</button>
                            </div>
                        </div>
                </el-col>
            </el-row>

            <el-row :gutter="20" class="posRelative marBT20" v-show="isCardNumImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="cardNumImages"
                                :action="cardNumAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                            :limit = "2"
                            :with-credentials='true'
                            :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <el-row :gutter="20" class="posRelative marBT20" v-show="isResumeImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="resumeImages"
                                :action="addResumeAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :limit = "5"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 离职图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isLeavingImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="leavingImages"
                                :action="leavingAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :limit = "2"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 职称证书图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isCerImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="cerImages"
                                :action="cerAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 学历证书图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isEduCerImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="eduCerImages"
                                :action="eduCerAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 建行卡图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isBankCardImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="bankCardImages"
                                :action="bankCardAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 驾驶证图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isDriverImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="driverImages"
                                :action="driverAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 行驶证图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isDrivingImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="drivingImages"
                                :action="drivingAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 交强险图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isTrafficImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="trafficImages"
                                :action="trafficAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

            <!-- 商业险图片集合 -->
            <el-row :gutter="20" class="posRelative marBT20" v-show="isCommercialImgShow">
                <el-col :span="24">
                        <div>
                            <el-upload
                                class="upload-demo"
                                list-type="picture-card"
                                ref = "upload"
                                :file-list="commercialImages"
                                :action="commercialAction"
                                :before-upload = "beforeUserPicpload"
                                :on-preview="previewResume"
                                :on-success = "submitResumeSuccess"
                                :on-error = "submitResumeError"
                                :on-exceed = "exceed"
                                :with-credentials='true'
                                :before-remove = "beforeResumeMove">
                                <img v-if="resumePicObj.resumeImageUrl" :src="resumePicObj.resumeImageUrl" class="avatar">
                                <i v-else class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="resumePicObj.resumeDialogVisible" :append-to-body="true">
                                <img width="100%" :src="resumePicObj.resumeDialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                </el-col>
            </el-row>

        </div>

        <!-- 图片裁剪组件 -->
        <div class="cropperWrapper" v-if="isShowCropper">
            <vueCropper ref="cropper"
                        :img="option.img"
                        :outputSize="option.outputSize"

                        :outputType="option.outputType"
                        :info="option.info"
                        :canScale="option.canScale"
                        :autoCrop="option.autoCrop"
                        :autoCropWidth="option.autoCropWidth"
                        :autoCropHeight="option.autoCropHeight"
                        :fixed="option.fixed"
                        :fixedNumber="option.fixedNumber"
                    ></vueCropper>
            <div class="cropperBtnPos">
                <button class="operatBtn" @click.stop="onCubeImg">确认裁剪</button>
                <button class="operatBtn" @click.stop="cancelCubeImg">取消</button>
            </div>
        </div>

        <!-- 教育经历审核弹框 -->
        <el-dialog
            title="教育经历审核"
            :visible.sync="eduDialogVisible"
            width="30%"
            :before-close="cancelExamineEdu"
            center>
            <el-radio-group v-model="auditStatus">
                <el-radio :label="2">通过</el-radio>
                <el-radio :label="3">不通过</el-radio>
            </el-radio-group>
            <el-input v-model.trim = "auditFailReason" placeholder="请输入审核原因" maxlength='20' class="inputTxtWrapper marT20"></el-input>
            <p class="tipRed" v-show="auditStatus === 3">审核不通过需要填写原因</p>
            <span slot="footer" class="dialog-footer">
                <el-button @click="cancelExamineEdu">取 消</el-button>
                <el-button type="primary" @click="sureExamineEdu">确 定</el-button>
            </span>
        </el-dialog>

        <!-- 奖惩记录审核弹框 -->
        <el-dialog
            title="奖惩记录审核"
            :visible.sync="rewardDialogVisible"
            width="30%"
            :before-close="cancelExamineReward"
            center>
            <el-radio-group v-model="rewardAuditStatus">
                <el-radio :label="2">通过</el-radio>
                <el-radio :label="3">不通过</el-radio>
            </el-radio-group>
            <el-input v-model.trim = "rewardsReason" placeholder="请输入审核原因" maxlength='20' class="inputTxtWrapper marT20"></el-input>
            <p class="tipRed" v-show="rewardAuditStatus === 3">审核不通过需要填写原因</p>
            <span slot="footer" class="dialog-footer">
                <el-button @click="cancelExamineReward">取 消</el-button>
                <el-button type="primary" @click="sureExamineReward">确 定</el-button>
            </span>
        </el-dialog>

        <!-- 职业等级审核弹框 -->
        <el-dialog
            title="职业等级记录审核"
            :visible.sync="occGradeDialogVisible"
            width="30%"
            :before-close="cancelExamineOccGrade"
            center>
            <el-radio-group v-model="occGradeAuditStatus">
                <el-radio :label="2">通过</el-radio>
                <el-radio :label="3">不通过</el-radio>
            </el-radio-group>
            <el-input v-model.trim = "occGradeAdjustReason" placeholder="请输入审核原因" maxlength='20' class="inputTxtWrapper marT20"></el-input>
            <p class="tipRed" v-show="occGradeAuditStatus === 3">审核不通过需要填写原因</p>
            <span slot="footer" class="dialog-footer">
                <el-button @click="cancelExamineOccGrade">取 消</el-button>
                <el-button type="primary" @click="sureExamineOccGrade">确 定</el-button>
            </span>
        </el-dialog>

        <!-- 调岗记录审核弹框 -->
        <el-dialog
            title="调岗记录审核"
            :visible.sync="postTransDialogVisible"
            width="30%"
            :before-close="cancelExaminePostTrans"
            center>
            <el-radio-group v-model="postTransAuditStatus">
                <el-radio :label="2">通过</el-radio>
                <el-radio :label="3">不通过</el-radio>
            </el-radio-group>
            <el-input v-model.trim = "postAdjustReason" placeholder="请输入审核原因" maxlength='20' class="inputTxtWrapper marT20"></el-input>
            <p class="tipRed" v-show="postTransAuditStatus === 3">审核不通过需要填写原因</p>
            <span slot="footer" class="dialog-footer">
                <el-button @click="cancelExaminePostTrans">取 消</el-button>
                <el-button type="primary" @click="sureExaminePostTrans">确 定</el-button>
            </span>
        </el-dialog>

        <!-- 状态记录审核弹框 -->
        <el-dialog
            title="状态记录审核"
            :visible.sync="userStatusDialogVisible"
            width="30%"
            :before-close="cancelExamineUserStatus"
            center>
            <el-radio-group v-model="userStatusAuditStatus">
                <el-radio :label="2">通过</el-radio>
                <el-radio :label="3">不通过</el-radio>
            </el-radio-group>
            <el-input v-model.trim = "userStatusAdjustReason" placeholder="请输入审核原因" maxlength='20' class="inputTxtWrapper marT20"></el-input>
            <p class="tipRed" v-show="userStatusAuditStatus === 3">审核不通过需要填写原因</p>
            <span slot="footer" class="dialog-footer">
                <el-button @click="cancelExamineUserStatus">取 消</el-button>
                <el-button type="primary" @click="sureExamineUserStatus">确 定</el-button>
            </span>
        </el-dialog>

    </div>

</template>
<script>

import http from '../../../../assets/js/http'
import _g from '@/assets/js/global'
import Cookies from "js-cookie"

import config from '@/assets/js/config.js'

  import { dataURItoBlob,validateCardNo,validateQQ,validateNonnegativeInt,validateNonnegativeNum,validateCapital,validateNum,validateRealNum} from "@/assets/js/common.js"

import { sex,outlook,maritalStatus,health,nation,educationArr,workNatureArr,rewardsArr} from "@/assets/js/data.js"

  export default {
    data() {
        
        // 验证工号
        let validateStaffNum = (rule, value, callback) => {
            const firstChar = value.slice(0,1)
            if(!validateCapital(firstChar)){
                callback(new Error("首字符为大写字母"))
            }
            const str = value.slice(1)
            if (!validateNum(str)) {
                callback(new Error("请输入数字值"))
            }else{
                callback()
            }
        }

        // 验证QQ
        let validateUserQQ =  (rule, value, callback) => {
            if (value !== '' && !validateQQ(value)) {
                callback(new Error("请输入正确的qq号"))
            }else{
                callback()
            }
        }

        // 身份证验证
        let validateCardNum =  (rule, value, callback) => {
            if (!validateCardNo(value)) {
                callback(new Error("身份证输入不合法"))
            }else{
                callback()
            }
        }

        // 历史社保验证
        let validateWoringAge =  (rule, value, callback) => {
            if (value !== '' && !validateNonnegativeInt(value)) {
                callback(new Error("请输入非负整数"))
            }else{
                callback()
            }
        }

        // 奖惩金额
        let validateRewardsMoney =  (rule, value, callback) => {
            // if (!validateNonnegativeNum(value)) {
            if (!validateRealNum(value)) {
                callback(new Error("请输入数字"))
            }else{
                callback()
            }
        }

        let validateUserStatusStartTime = (rule, value, callback) => {
            if (value !== '' && this.userStatusFrm.endEventTime !== '' && this.userStatusFrm.workNature !==5 && this.userStatusFrm.workNature !==7) {
                if(new Date(value).getTime() > new Date(this.userStatusFrm.endEventTime).getTime()){
                    callback(new Error("开始时间不能大于结束时间"))
                }else{
                    callback()
                }
            }else{
                callback()
            }
        }

        let validateUserStatusEndTime = (rule, value, callback) => {
            if (value !== '' && this.userStatusFrm.eventTime !== '') {
                if(new Date(value).getTime() < new Date(this.userStatusFrm.eventTime).getTime()){
                    callback(new Error("结束时间不能小于开始时间"))
                }else{
                    callback()
                }
            }else{
                callback()
            }
        }

        return {
            // 所有模块默认隐藏
            isUserPhotoShow:true,//    照片默认显示
            isIncumInfoShow:false,//    在职信息
            isBaseMsgShow:false,//    基本信息
            isFundSocialShow:false,//    公积金与社保
            isFamMemberShow:false,//    紧急联系人
            isEduExperShow:false,//    教育经历
            isRewardsShow:false,//    奖惩记录
            isPostTransShow:false,//    调岗记录
            isUserStatusShow:false,//    人员状态记录
            isOccGradeShow:false,//    职业等级记录
            isCardNumImgShow:false,//    身份证图片
            isResumeImgShow:false,//    简历图片
            isLeavingImgShow:false,//    离职图片
            isCerImgShow:false,//    职称证书图片
            isEduCerImgShow:false,//    学历证书图片
            isBankCardImgShow:false,//    建行卡图片
            isDriverImgShow:false,//    驾驶证图片
            isDrivingImgShow:false,//    行驶证图片
            isTrafficImgShow:false,//    交强险图片
            isCommercialImgShow:false,//    商业险图片

            //表单默认没有通过校验
            isFormOk:false,
            isIncumInfoOk:false,
            isBaseMsgFrmOk:false,
            isFundSocialFrmOk:false,
            isMemberFrmOk:false,
            isEduFrmOk:false,
            isRewardFrmOk:false,
            isPostTransFrmOk:false,
            isUserStatusFrmOk:false,
            isOccGradeFrmOk:false,

            // 新增简历图片、身份证图片、职称证书图片、离职图片、奖惩图片请求路径
            addResumeAction : '',
            cardNumAction : '',
            cerAction : '',
            leavingAction : '',
            rewardAction : '',

            resumeImages : [],                                                      //  简历图片集合                                                            
            cardNumImages : [],                                                      //  身份证图片集合                                                            
            cerImages : [],                                                      //  职称证书图片集合                                                            
            leavingImages : [],                                                      //  离职图片集合                                                            
            rewardImages : [],                                                      //  奖惩图片集合               
            
            eduCerImages : [],                                                      //  学历证书图片
            bankCardImages : [],                                                      //  银行卡图片
            driverImages : [],                                                      //  驾驶证图片
            drivingImages : [],                                                      //  行驶证图片
            trafficImages : [],                                                      //  交强险图片
            commercialImages : [],                                                      //  商业险图片

            userPromise : 1,                                                        //  默认用户已承诺，如果为1，即已经承诺，则显示履历页面，如果为2，则显示编辑或新增页面
            posList:[],                                                                             //  职位列表

            departs:[],                                                                             //  所有的显示部门列表
            form: {
                id:null,                                                                                //  人员id 
                userPromise:2,                                                      //  用户默认没有承诺履历
            staffNum: '',                                                                         //  工号
            posId:null,                                                                         //  选中的职位id
            departId:null,                                                                                  //  选中的部门id

            },
            rules: {
                staffNum: [
                    {
                        required: true,
                        message: "请输入工号",
                        trigger: "blur"
                    },
                    {
                        min: 6,
                        max: 6,
                        message: "工号必须为6位",
                        trigger: "blur"
                    },
                    {
                        validator: validateStaffNum,
                        message: "工号首位大写字母加五位数字",
                        trigger: "blur"
                    }
                ],
                posId: [
                    {
                        required: true,
                        message: "请选择职位",
                        trigger: "change"
                    }
                ],
                departId: [
                    {
                        required: true,
                        message: "请选择部门",
                        trigger: "change"
                    }
                ],
            },

            //  下面为履历
            
                // 前端静态数据
                sex,outlook,maritalStatus,health,nation,educationArr,workNatureArr,rewardsArr,


                userId:null,                                                                    //  用户id

                // 裁剪组件的基础配置option
                option: {
                    img: '',                         //裁剪图片的地址
                    info: true,                      //裁剪框的大小信息
                    outputSize: 0.8,                   // 裁剪生成图片的质量
                    outputType: 'jpg',              //裁剪生成图片的格式
                    canScale: false,                 // 图片是否允许滚轮缩放
                    autoCrop: true,                  // 是否默认生成截图框
                    autoCropWidth: 150,              // 默认生成截图框宽度
                    autoCropHeight: 150,             // 默认生成截图框高度
                    canMove: true,                      //  能否拖动图片
                    fixed: true,                    //是否开启截图框宽高固定比例
                    // fixedNumber: [4, 4],              //截图框的宽高比例
                    centerBox: true                 //  截图框是否限制在图片里(只有在自动生成截图框时才能生效)
                },
                isShowCropper: false,            //是否显示截图框

                fileList: [],                           
                imageUrl: '',                                                               //..图片路径
                
                oldPhotoName:'',                                                //..最新一次上传的图片名称

                paramFile:null,                                                      //  图片
                resumeFile:null,                                                    //  简历

                // 简历图片集合
                resumePicObj:{
                    resumeImageUrl : '',                                             //  预览简历小图路径
                    resumeDialogImageUrl : '',                                  //  弹框图片路径
                    resumeDialogVisible : false,                                  //  简历dialog默认隐藏
                },
                
                // 在职信息
                incumInfo:{
                    oldStaffNum : '',                                                   //  旧工号
                    staffNum : '',                                                      //  工号
                    depart:'',                                                              //..部门
                    posName:'',                                                              //..职位
                    departId:'',                                                              //..部门Id
                    posId:'',                                                              //..职位Id
                },
                isShowStaffNumInput : false,                                //  工号文本框默认不显示

                // 基本信息
                baseMsgFrm:{
                    userName:'',//..姓名
                    userSex:1, //..性别
                    userBirth:'',//..出生年月
                    politicalOutlook:13,       //  政治面貌
                    maritalStatus:1,       //  婚姻状况
                    health:1,                   //  健康状况
                    nativePlace:'',         //..籍贯
                    userEmail:'',       //..邮箱
                    qq:'',                //  QQ       
                    nation:1,           //  民族              
                    userTitle:'',   //..职称
                    userTel:'',     //..联系电话
                    userCardNo:'',      //..身份证号
                    perAddress:'',      //..户籍所在地
                    concatAddress:'',      //..常住地址
                    gradSchool:'',  //  毕业院校
                    gradTime:'',  //  毕业时间
                },
                
                // 存储旧数据，取消时用
                oldBaseMsgFrm:{},

                isBaseFrmShow:false,                                                            //  基本信息表单默认隐藏 

                // 公积金与社保
                fundSocialFrm:{
                    existWorkingAge:'',  //  历史社保
                    comSocialSec:'',  //  本司社保
                    comWorkingTime:'',  //  本司工龄
                    totalWorkingTime:'',  //  总工龄
                    fundAccount:'',  //  公积金账号
                },
                // 存储旧数据，取消时用
                oldFundSocialFrm:{},
                isFundSocialFrmShow:false,                                                            //  公积金与社保表单默认隐藏 

                // 新增的家庭成员信息
                memberFrm:{
                    memberCall:'',  //  称呼
                    memberName:'',  //  姓名
                    memberTel:'',  //  电话
                },
                memberList:[],                                                      //  家庭人员列表
                isMemberFrmShow:false,                                      //  默认隐藏家庭人员表单
                isAddorEdit:true,                                                   //  默认为确认提交按钮
                currEditorMember:{
                    memberId:null,                                              //  当前修改的紧急联系人的id
                    index:null,                                              //  当前修改的紧急联系人的数组索引
                },

                // 教育经历开始
                eduFrm:{
                    education:6,  //  学历
                    gradSchool:'',  //  毕业院校
                    professName:'',  //  专业名称
                    // editReason:'',  // 修改原因
                    gradTime:'',//  毕业时间
                },
                eduList:[],                                                      //  教育经历列表
                isEduFrmShow:false,                                      //  默认隐藏教育经历表单
                isAddorEditEduBtn:true,                                                   //  默认为确认提交按钮
                currEditorEdu:{
                    eduId:null,                                              //  当前修改的教育经历的id
                    index:null,                                              //  当前修改的教育经历的数组索引
                },
                eduDialogVisible:false,                             //  教育经历审核弹框默认关闭
                auditStatus:2,                                              //  教育经历默认审核通过
                auditFailReason:'',                                     //  审核原因
                currExamineEdu:{
                    eduId:null,                                              //  当前需要审核的教育经历的id
                    index:null,                                              //  当前需要审核的教育经历的数组索引
                },

                // 奖惩记录开始
                rewardFrm:{
                    rewardsType:1,  //  奖惩类型默认为奖励
                    rewardsTime:'',  //  奖惩日期(年月日)
                    rewardsMoney:0,  //  奖惩金额默认为0
                    rewardsReason:'',  //  奖惩原因
                    fileNum : '',               //  文件编号
                    // editReason:'',  // 修改原因
                },
                rewardList:[],                                                      //  奖惩记录列表
                isRewardFrmShow:false,                                      //  默认隐藏奖惩表单
                isAddorEditRewardBtn:true,                                                   //  默认为确认提交按钮
                currEditorReward:{
                    rewardId:null,                                              //  当前修改的奖惩记录的id
                    index:null,                                              //  当前修改的奖惩记录的数组索引
                },
                rewardDialogVisible:false,                             //  奖惩记录审核弹框默认关闭
                rewardAuditStatus:2,                                              //  奖惩记录默认审核通过
                rewardsReason:'',                                     //  审核原因
                currExamineReward:{
                    rewardId:null,                                              //  当前需要审核的奖惩记录的id
                    index:null,                                              //  当前需要审核的奖惩记录的数组索引
                },

                // 调岗记录开始
                postTransFrm:{
                    postAdjustTime:'',  //  调岗时间（精确到年月日）
                    newPostId : null,  //  新的职位id
                    newDepartId : null,  //  新的部门id
                    oldPostName : '',  //  原来职位
                    newPostName : '',  //  新的职位
                    oldDepartName : '',  //  原来部门
                    newDepartName : '',  //  新的部门
                    postAdjustReason : '',  //  调岗原因
                    fileNum : '',               //  文件编号
                    postAdjustNum : '',               //  调岗编号
                },
                postTransList:[],                                                      //  调岗记录列表
                isPostTransFrmShow:false,                                      //  默认隐藏调岗表单
                isAddorEditPostTransBtn:true,                                                   //  默认为确认提交按钮
                currEditorPostTrans:{
                    postTransId:null,                                              //  当前修改的调岗记录的id
                    index:null,                                              //  当前修改的调岗记录的数组索引
                },
                postTransDialogVisible:false,                             //  调岗记录审核弹框默认关闭
                postTransAuditStatus:2,                                              //  调岗记录默认审核通过
                postAdjustReason:'',                                     //  审核原因
                currExaminePostTrans:{
                    postTransId:null,                                              //  当前需要审核的调岗记录的id
                    index:null,                                              //  当前需要审核的调岗记录的数组索引
                },

                // 人员状态记录开始
                userStatusFrm:{
                    workNature:1,  //  工作状态，默认在校实习生
                    eventTime : '',  //  工作状态开始时间
                    endEventTime : '',  //  工作状态结束时间
                },
                userStatusList:[],                                                      //  人员动态记录列表
                isUserStatusFrmShow:false,                                      //  默认隐藏人员动态表单
                isAddorEditUserStatusBtn:true,                                                   //  默认为确认提交按钮
                currEditorUserStatus:{
                    userStatusId:null,                                              //  当前修改的动态记录的id
                    index:null,                                              //  当前修改的动态记录的数组索引
                },
                userStatusDialogVisible:false,                             //  动态记录审核弹框默认关闭
                userStatusAuditStatus:2,                                              //  动态记录默认审核通过
                userStatusAdjustReason:'',                          //  审核原因
                currExamineUserStatus:{
                    userStatusId:null,                                              //  当前需要审核的动态记录的id
                    index:null,                                              //  当前需要审核的动态记录的数组索引
                },

                // 职业等级记录
                rankList:[],//  职级列表

                occGradeFrm:{
                    occGradeStr:'',  //  职业等级字符串内容
                    eventTime : '',  //  工作状态开始时间
                    // editReason:'',  // 修改原因
                },
                occGradeList:[],                                                      //  职业等级记录列表
                isOccGradeFrmShow:false,                                      //  默认隐藏职业等级表单
                isAddorEditOccGradeBtn:true,                                                   //  默认为确认提交按钮
                currEditorOccGrade:{
                    occGradeId:null,                                              //  当前修改的职业等级记录的id
                    index:null,                                              //  当前修改的职业等级记录的数组索引
                },
                occGradeDialogVisible:false,                             //  职业等级记录审核弹框默认关闭
                occGradeAuditStatus:2,                                              //  职业等级记录默认审核通过
                occGradeAdjustReason:'',                          //  审核原因
                currExamineOccGrade:{
                    occGradeId:null,                                              //  当前需要审核的职业等级记录的id
                    index:null,                                              //  当前需要审核的职业等级记录的数组索引
                },

                /* 在职信息校验 */
                incumInfoRules : {
                    staffNum:[{
                        required: true,
                        message: "请输入工号",
                        trigger: "change"
                    },{
                        min: 6,
                        max: 6,
                        message: "工号必须为6位",
                        trigger: "change"
                    },{
                        validator: validateStaffNum,
                        message: "工号首位大写字母加五位数字",
                        trigger: "change"
                    }]
                },

                // 基本信息校验
                baseMsgFrmRules: {
                    userName: [{
                            required: true,
                            message: "请输入姓名",
                            trigger: "change"
                        },
                    ],
                    nativePlace: [{
                            required: true,
                            message: "请输入籍贯",
                            trigger: "change"
                        }
                    ],
                    userEmail: [
                        { type: 'email', message: '请输入正确的邮箱地址', trigger: ['change'] }
                    ],
                    qq: [
                        {
                            validator: validateUserQQ,
                            message: "请输入正确的qq号",
                            trigger: "change"
                        }
                    ],
                    userTel: [{
                            required: true,
                            message: "请输入联系电话",
                            trigger: "change"
                        }
                    ],
                    userCardNo: [
                        {
                            required: true,
                            message: "请输入身份证号码",
                            trigger: "change"
                        },
                        {
                            validator: validateCardNum,
                            message: "身份证输入不合法",
                            trigger: "change"
                        }
                    ],
                    perAddress: [{
                            required: true,
                            message: "请输入户籍地址",
                            trigger: "change"
                        }
                    ],
                    concatAddress: [{
                            required: true,
                            message: "请输入常住地址",
                            trigger: "change"
                        }
                    ],
                },

                // 公积金与社保校验
                fundSocialFrmRules:{
                    existWorkingAge: [    // 历史社保验证
                        {
                            validator: validateWoringAge,
                            message: "请输入非负整数",
                            trigger: "change"
                        }
                    ],
                },
                // 紧急联系人校验
                memberRules:{
                    memberCall: [{
                            required: true,
                            message: "请输入称呼",
                            trigger: "change"
                        }
                    ],
                    memberTel: [{
                            required: true,
                            message: "请输入联系电话",
                            trigger: "change"
                        }
                    ],
                    
                    memberName: [{
                            required: true,
                            message: "请输入姓名",
                            trigger: "change"
                        },
                    ]
                },

                // 教育经历校验
                eduFrmRules:{
                    gradSchool: [{
                            required: true,
                            message: "请输入毕业院校",
                            trigger: "change"
                    }],
                    gradTime: [{
                            required: true,
                            message: "请选择毕业时间",
                            trigger: "change"
                    }],
                    professName: [{
                            required: true,
                            message: "请输入专业名称",
                            trigger: "change"
                    }],
                },

                // 奖惩记录校验
                rewardFrmRules:{
                    fileNum:[{
                            required: true,
                            message: "请输入文件编号",
                            trigger: "change"
                    }],
                    rewardsMoney: [{
                            required: true,
                            message: "请输入奖惩金额",
                            trigger: "change"
                    },{
                            validator: validateRewardsMoney,
                            message: "请输入数字",
                            trigger: "change"
                    }],
                    rewardsReason: [{
                            required: true,
                            message: "请输入奖惩原因",
                            trigger: "change"
                    }],
                    rewardsTime: [{
                            required: true,
                            message: "请选择奖惩日期",
                            trigger: "change"
                    }],
                },

                // 调岗记录表单校验
                postTransFrmRules:{
                    fileNum: [{
                            required: true,
                            message: "请输入文件编号",
                            trigger: "change"
                    }],
                    postAdjustNum: [{
                            required: true,
                            message: "请输入调岗编号",
                            trigger: "change"
                    }],
                    newPostId: [{
                            required: true,
                            message: "请选择新的职位",
                            trigger: "change"
                    }],
                    newDepartId: [{
                            required: true,
                            message: "请选择新的部门",
                            trigger: "change"
                    }],
                    postAdjustReason: [{
                            required: true,
                            message: "请输入调岗原因",
                            trigger: "change"
                    }],
                    postAdjustTime: [{
                            required: true,
                            message: "请选择调岗日期",
                            trigger: "change"
                    }],
                },

                // 状态记录表单校验
                userStatusFrmRules:{
                    eventTime: [{
                            required: true,
                            message: "请选择开始时间",
                            trigger: "change"
                    },{
                            validator: validateUserStatusStartTime,
                            message: "开始时间不能大于结束时间",
                            trigger: "change"
                    }],
                    endEventTime: [{
                            required: true,
                            message: "请选择结束时间",
                            trigger: "change"
                    },{
                            validator: validateUserStatusEndTime,
                            message: "结束时间不能小于开始时间",
                            trigger: "change"
                    }],
                }, 

                // 职业等级记录表单校验
                occGradeFrmRules:{
                    occGradeStr: [{
                            required: true,
                            message: "请输入职业等级",
                            trigger: "change"
                    }],
                    eventTime: [{
                            required: true,
                            message: "请选择开始时间",
                            trigger: "change"
                    }],
                }, 
        }
    },
    methods: {
        /* 各模块隐藏 */
        hideModule(){
            // 隐藏所有模块
            this.isUserPhotoShow =false
            this.isIncumInfoShow =false
            this.isBaseMsgShow =false
            this.isFundSocialShow =false
            this.isFamMemberShow =false
            this.isEduExperShow =false
            this.isRewardsShow =false
            this.isPostTransShow =false
            this.isUserStatusShow =false
            this.isOccGradeShow =false
            this.isCardNumImgShow =false
            this.isResumeImgShow =false
            this.isLeavingImgShow =false
            this.isCerImgShow =false
            this.isEduCerImgShow =false
            this.isBankCardImgShow =false
            this.isDriverImgShow =false
            this.isDrivingImgShow =false
            this.isTrafficImgShow =false
            this.isResumeImgShow =false
            this.isCommercialImgShow =false
            // 隐藏所有表单
            this.isShowStaffNumInput = false                                //  工号文本框不显示
            this.isBaseFrmShow = false                                                            //  基本信息表单隐藏 
            this.isFundSocialFrmShow = false                                                            //  公积金与社保表单隐藏 
            this.isMemberFrmShow = false                                      //  隐藏家庭人员表单
            this.isEduFrmShow = false                                      //  隐藏教育经历表单
            this.isRewardFrmShow = false                                      //  隐藏奖惩表单
            this.isPostTransFrmShow = false                                      //  隐藏调岗表单
            this.isUserStatusFrmShow = false                                      //  隐藏人员动态表单
            this.isOccGradeFrmShow = false                                      //  隐藏职业等级表单
        },
        /* 根据用户id查询大头照 */
        getUserPhoto(){
            const that = this
            const userId = that.userId
            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryUserPhotoByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 大头照初始化
                        that.imageUrl = res.data.userPhoto.photo_path
                        that.oldPhotoName = res.data.userPhoto.photo_name

                        that.hideModule()
                        that.isUserPhotoShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询用户最新的部门与职位 */
        getIncumInfo(){
            const that = this
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryLastDapartAndPos', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 在职信息初始化
                        that.incumInfo.staffNum = res.data.userBaseInfo.staffnum
                        that.incumInfo.oldStaffNum = res.data.userBaseInfo.staffnum
                        that.incumInfo.posName = res.data.userBaseInfo.post.pos_name
                        that.incumInfo.depart = res.data.userBaseInfo.depart.depart_name
                        that.incumInfo.posId = res.data.userBaseInfo.post.id
                        that.incumInfo.departId = res.data.userBaseInfo.depart.id

                        that.hideModule()
                        that.isIncumInfoShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询用户基本信息 */
        getBaseMsg(){
            const that = this
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/users/queryBaseMsgByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 基本信息初始化
                        that.baseMsgFrm.userName = res.data.userBaseInfo.user_name
                        that.baseMsgFrm.userSex = res.data.userBaseInfo.user_sex
                        that.baseMsgFrm.userBirth = res.data.userBaseInfo.date_birth
                        that.baseMsgFrm.politicalOutlook = res.data.userBaseInfo.political_outlook
                        that.baseMsgFrm.maritalStatus = res.data.userBaseInfo.marital_status
                        that.baseMsgFrm.health = res.data.userBaseInfo.health
                        that.baseMsgFrm.nativePlace = res.data.userBaseInfo.native_place
                        that.baseMsgFrm.userEmail = res.data.userBaseInfo.user_email === null ? '' : res.data.userBaseInfo.user_email
                        that.baseMsgFrm.qq = res.data.userBaseInfo.user_qq === null ? '' : res.data.userBaseInfo.user_qq
                        that.baseMsgFrm.nation = res.data.userBaseInfo.nation
                        that.baseMsgFrm.userTitle = res.data.userBaseInfo.user_title === null ? '' : res.data.userBaseInfo.user_title
                        that.baseMsgFrm.userTel = res.data.userBaseInfo.user_tel
                        that.baseMsgFrm.userCardNo = res.data.userBaseInfo.user_card_num
                        that.baseMsgFrm.perAddress = res.data.userBaseInfo.per_address
                        that.baseMsgFrm.concatAddress = res.data.userBaseInfo.concat_address
                        that.baseMsgFrm.gradSchool = res.data.userBaseInfo.grad_school === null ? res.data.userBaseInfo.ini_school : res.data.userBaseInfo.grad_school
                        that.baseMsgFrm.gradTime = res.data.userBaseInfo.grad_time === null ? res.data.userBaseInfo.ini_grad_time : res.data.userBaseInfo.grad_time

                        that.oldBaseMsgFrm = Object.assign({}, that.baseMsgFrm) 

                        that.hideModule()
                        that.isBaseMsgShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询用户基本信息(获取公积金与社保) */
        getFundSocial(){
            const that = this
            const userId = that.userId
            
            _g.showLoading('加载中')
            that.apiPost('admin/users/queryBaseMsgByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 公积金与社保初始化
                        that.fundSocialFrm.existWorkingAge = res.data.userBaseInfo.exist_working_age === null ? '' : res.data.userBaseInfo.exist_working_age
                        that.fundSocialFrm.comSocialSec = res.data.userBaseInfo.company_social_sec
                        that.fundSocialFrm.comWorkingTime = res.data.userBaseInfo.company_working_time
                        that.fundSocialFrm.fundAccount = res.data.userBaseInfo.fund_account === null ? '' : res.data.userBaseInfo.fund_account

                        if(res.data.userBaseInfo.exist_working_age !== null){
                            that.fundSocialFrm.totalWorkingTime = parseInt(res.data.userBaseInfo.exist_working_age) + parseInt(res.data.userBaseInfo.company_social_sec) + parseInt(res.data.userBaseInfo.company_working_time)
                        }

                        that.oldFundSocialFrm = Object.assign({}, that.fundSocialFrm) 

                        that.hideModule()
                        that.isFundSocialShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询紧急联系人 */
        getFamMember(){
            const that = this
            let memberList = []
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryMemberByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 紧急联系人初始化
                        for(let member of res.data.memberList){
                            memberList.push({
                                memberId : member.id,
                                memberCall : member.member_call,
                                memberName : member.member_name,
                                memberTel : member.member_tel,
                            })
                        }
                        that.memberList = memberList

                        that.hideModule()
                        that.isFamMemberShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询所有教育经历 */
        getEduExper(){
            const that = this
            let eduList = []
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryEduExperByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 教育经历初始化
                        for(let education of res.data.eduExperList){
                            eduList.push({
                                eduId : education.id,
                                education : education.education,
                                gradSchool : education.graduated_school,
                                gradTime : education.graduated_time,
                                professName : education.professional_name,
                                auditStatus : education.audit_status,
                                auditFailReason : education.audit_fail_reason || '/',
                            })
                        }
                        that.eduList = eduList

                        that.hideModule()
                        that.isEduExperShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询所有奖惩记录 */
        getRewards(){
            const that = this
            let rewardList = []
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryRewardByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                    // 奖惩记录初始化
                        for(let item of res.data.rewardsList){
                            rewardList.push({
                                rewardId : item.id,
                                rewardsType : item.rewards_type,
                                rewardsTime : item.rewards_time,
                                rewardsReason : item.rewards_reason,
                                rewardsMoney : item.rewards_money,
                                auditStatus : item.audit_status,
                                auditFailReason : item.audit_fail_reason || '/',
                                fileNum : item.file_num,
                            })
                        }
                        that.rewardList = rewardList

                        that.hideModule()
                        that.isRewardsShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询所有调岗记录 */
        getPostTrans(){
            const that = this
            let postTransList = []
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryPostTransByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 岗位调动记录初始化
                        for(let item of res.data.postTransList){
                            postTransList.push({
                                postTransId : item.id,
                                postAdjustTime : item.post_adjust_time,
                                postAdjustNum : item.post_adjust_num,
                                newPostId : item.new_post_id,
                                newDepartId : item.new_depart_id,
                                postAdjustReason : item.post_adjust_reason,
                                auditStatus : item.audit_status,
                                auditFailReason : item.audit_fail_reason || '/',
                                fileNum : item.file_num,
                            })
                            if(item.audit_status === 2){//  如果审核通过
                                postTransList[postTransList.length - 1]['oldPostName'] =  item.old_read_only_post_name === null ? res.data.lastNewDepartAndPost.lastNewReadOnlyPostName : item.old_read_only_post_name
                                postTransList[postTransList.length - 1]['newPostName'] =  item.new_read_only_post_name
                                postTransList[postTransList.length - 1]['oldDepartName'] =  item.old_read_only_depart_name === null ? res.data.lastNewDepartAndPost.lastNewReadOnlyDepartName : item.old_read_only_depart_name
                                postTransList[postTransList.length - 1]['newDepartName'] =  item.new_read_only_depart_name
                            }else{
                                postTransList[postTransList.length - 1]['oldPostName'] =  res.data.lastNewDepartAndPost.lastNewReadOnlyPostName
                                postTransList[postTransList.length - 1]['oldDepartName'] =  res.data.lastNewDepartAndPost.lastNewReadOnlyDepartName
                                
                                postTransList[postTransList.length - 1]['newPostName'] =  item.new_pos_name
                                postTransList[postTransList.length - 1]['newDepartName'] =  item.new_depart_name
                            }
                        }
                        that.postTransList = postTransList

                        that.hideModule()
                        that.isPostTransShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询所有人员状态记录 */
        getUserStatus(){
            const that = this
            let userStatusList = []
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryUserStatusByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 人员状态记录初始化
                        for(let item of res.data.userStatusList){
                            userStatusList.push({
                                userStatusId : item.id,
                                workNature : item.work_nature,
                                auditStatus : item.audit_status,
                                auditFailReason : item.audit_fail_reason || '/',
                                eventTime : item.event_time,
                                endEventTime : item.end_event_time || '/',
                            })
                        }
                        that.userStatusList = userStatusList

                        that.hideModule()
                        that.isUserStatusShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询所有职业等级记录 */
        getOccGrade(){
            const that = this
            let occGradeList = []
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryOccGradeByUserId', {userId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        // 职业等级记录初始化
                        for(let item of res.data.occGradeList){
                            occGradeList.push({
                                occGradeId : item.id,
                                occGradeStr : item.occ_grade_str,
                                auditStatus : item.audit_status,
                                auditFailReason : item.audit_fail_reason || '/',
                                eventTime : item.event_time,
                            })
                        }
                        that.occGradeList = occGradeList

                        that.hideModule()
                        that.isOccGradeShow = true
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        },
        /* 根据用户id查询所有图片 */
        getPics(type){
            const that = this
            let imgList = []
            const userId = that.userId

            _g.showLoading('加载中')
            that.apiPost('admin/resume/queryResumePicsByUserId', {userId,type}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){             //  成功
                        that.hideModule()

                        if(type === 1){
                            that.isResumeImgShow = true
                        }else if(type === 2){
                            that.isCardNumImgShow = true
                        }else if(type === 3){
                            that.isCerImgShow = true
                        }else if(type === 4){
                            that.isLeavingImgShow = true
                        }else if(type === 5){
                        }else if(type === 6){
                            that.isEduCerImgShow = true
                        }else if(type === 7){
                            that.isBankCardImgShow = true
                        }else if(type === 8){
                            that.isDriverImgShow = true
                        }else if(type === 9){
                            that.isDrivingImgShow = true
                        }else if(type === 10){
                             that.isTrafficImgShow = true
                        }else if(type === 11){
                            that.isCommercialImgShow = true
                        }

                        for(let item of res.data.resumeFileList){
                            if(item.type === 1){//  简历图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.resumeImages = [].concat(imgList)
                            }else if(item.type === 2){//  身份证图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.cardNumImages = [].concat(imgList)
                            }else if(item.type === 3){//  职称证书图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.cerImages = [].concat(imgList)
                            }else if(item.type === 4){//  离职图片图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.leavingImages = [].concat(imgList)
                            }else if(item.type === 5){//  奖惩图片
                            }else if(item.type === 6){//  学历证书图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.eduCerImages = [].concat(imgList)
                            }else if(item.type === 7){//  建行卡图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.bankCardImages = [].concat(imgList)
                            }else if(item.type === 8){//  驾驶证图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.driverImages =  [].concat(imgList)
                            }else if(item.type === 9){//  行驶证图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.drivingImages = [].concat(imgList)
                            }else if(item.type === 10){//  交强险图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.trafficImages = [].concat(imgList)
                            }else if(item.type === 11){//  商业险图片
                                imgList.push({
                                    name : item.resume_file_name,
                                    url : item.resume_file_path,
                                    response : {
                                        data : {
                                            fileId : item.id
                                        }
                                    }      
                                })
                                that.commercialImages =  [].concat(imgList)
                            }
                        }
                    }else{
                        _g.toastMsg("error", res.message)
                    }
                }
            })

        },


        /* 侦听基本表单改变与校验是否通过 */ 
        watchFrmChange(frmName){
            switch (frmName){
                case 'form':
                    this.isFormOk = true
                    break
                case 'incumInfo':
                    this.isIncumInfoOk = true
                    break
                case 'baseMsgFrm':
                    this.isBaseMsgFrmOk = true
                    break
                case 'fundSocialFrm':
                    this.isFundSocialFrmOk = true
                    break
                case 'memberFrm':
                    this.isMemberFrmOk = true
                    break
                case 'eduFrm':
                    this.isEduFrmOk = true
                    break
                case 'rewardFrm':
                    this.isRewardFrmOk = true
                    break
                case 'postTransFrm':
                    this.isPostTransFrmOk = true
                    break
                case 'userStatusFrm':
                    this.isUserStatusFrmOk = true
                    break
                case 'occGradeFrm':
                    this.isOccGradeFrmOk = true
                    break
            }
        },
        /* 文件超出个数限制时的钩子 */
        exceed(files, fileList){
            _g.toastMsg("warning", '文件最多' + fileList.length + '个!')
        },
        /* 用户图片上传之前 */
        beforeUserPicpload(file){
            const fileSize = file.size / 1024                                              //  换选成K
           if(file.type !== 'image/jpeg' && file.type !== 'image/png'){
                _g.toastMsg("warning", '只能上传jpg、jpeg、png图片，上传失败!')
                return false
            }
            if(fileSize > 500){                                                                             //  如果超过500k
                _g.toastMsg("warning", '文件不能超过500k，上传失败!')
                return false
            }
        },
        /* 预览简历图片 */
        previewResume(file){
            this.resumePicObj.resumeDialogImageUrl = file.url;
            this.resumePicObj.resumeDialogVisible = true;
        },
        /* /* 删除简历图片之前 */ 
        beforeResumeMove(file, fileList){
             const that = this
            let fileId = null
            let delIndex = null

             if(file.response){
                 fileId = file.response.data.fileId
             }else{                                                                                 //  如果是没有提交的图片
                 for(let i = 0;i < fileList.length;i++){
                    if(file.uid === fileList[i].uid){
                        delIndex = i
                        break
                    }
                }

                fileList.splice(delIndex,1)
                 return false
             }


             that.$confirm('是否确认删除图片?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                    _g.showLoading('删除中')
                    
                    that.apiPost('admin/resume/deleteUserPic', {fileId}).then((res) => {
                         _g.showLoading().close()
                         if(typeof res === 'string'){
                            res = JSON.parse(res)
                          }
                        if (res.code != 200) {
                          that.handleError(res)
                        } else {
                          if(res.data.isSuccess === 0){             //  成功
                              _g.toastMsg("success", res.message)
                              
                              for(let i = 0;i < fileList.length;i++){
                                  if(file.uid === fileList[i].uid){
                                      delIndex = i
                                      break
                                  }
                              }

                              fileList.splice(delIndex,1)

                          }else{
                              _g.toastMsg("error", res.message)
                          }
                        }
                    })
              }).catch(() => {});
              return false
        },
        /* 简历图片上传成功 */
        submitResumeSuccess(response, file, fileList){
            _g.toastMsg('success',response.message)
        },
        /* 简历图片上传失败 */
        submitResumeError(err, file, fileList){
            _g.toastMsg('error',response.message)
        },

      /* 重置表单 */
      resetForm(formName) {
        this.$refs[formName].resetFields();
      },

    /* 查询工号是否重复 */
    queryStaffNumRepeat(){
        const that = this
        const userId = that.form.id
        const staffNum = that.form.staffNum
        that.$refs['form'].validateField('staffNum',(validMessage)=>{
             if(validMessage != ""){    //..如果前端校验不通过                                        
                return false;
            }else{  //  如前端校验通过
                that.apiPost('admin/users/queryStaffNumRepeat', {userId,staffNum}).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                        res = JSON.parse(res)
                        }
                    if (res.code != 200) {
                        that.handleError(res)
                    } else {
                        if(res.data.isSuccess === 0){             //  成功
                        }else if(res.data.isSuccess === 1 || res.data.isSuccess === 2){
                            _g.toastMsg("error", res.message)
                        }
                    }
                })
            }
        })
    },

      /* 确认新建用户 */
      add(form) {
        const that = this
        this.$refs[form].validate((valid) => {                                              //  表单校验成功
          if (valid) {
              that.$confirm('是否确认新增用户?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                    _g.showLoading('提交中')
                    
                    that.apiPost('admin/users/save', {...that.form}).then((res) => {
                         _g.showLoading().close()
                         if(typeof res === 'string'){
                            res = JSON.parse(res)
                          }
                        if (res.code != 200) {
                          that.handleError(res)
                        } else {
                          if(res.data.isSuccess === 0){             //  成功
                              _g.toastMsg("success", res.message)
                              that.$router.push('/admin/users/list')
                          }else{
                              _g.toastMsg("error", res.message)
                          }
                        }
                    })
              }).catch(() => {});
          }
        })
      },

      /* 确认修改用户 */
      edit(form) {
        const that = this
        this.$refs[form].validate((valid) => {                                              //  表单校验成功
          if (valid) {
              that.$confirm('是否确认修改用户?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                    _g.showLoading('提交中')
                    that.apiPost('admin/users/update', {...that.form}).then((res) => {
                         _g.showLoading().close()
                         if(typeof res === 'string'){
                            res = JSON.parse(res)
                          }
                        if (res.code != 200) {
                          that.handleError(res)
                        } else {
                          if(res.data.isSuccess === 0){             //  成功
                                _g.toastMsg("success", res.message)

                                // 本地存储工号
                                Cookies.set('staffNum',that.form.staffNum)
                                that.$store.dispatch('setUserStaffNum',that.form.staffNum)

                                that.$router.push('/admin/users/list')
                          }else{
                              _g.toastMsg("error", res.message)
                          }
                        }
                    })
              }).catch(() => {});
          }
        })
      },
      
      /* 获取显示的部门 */
      getDeparts() {
        _g.showLoading('部门加载中');
        const that = this
        that.apiPost('admin/addDepart').then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                res = JSON.parse(res)
            }
            if (res.code != 200) {
                that.handleError(res)
            } else {
                if(res.data.isSuccess === 0){
                    that.departs = res.data.departList
                }else if(res.data.isSuccess === 1){
                    _g.toastMsg("error", res.message)
                }else if(res.data.isSuccess === 2){                                         //  未设置部门
                    _g.toastMsg("error", res.message)
                    that.$router.push('/admin/structures/addDepart')
                }
            }
        })
      },

      /* 获取所有职位 */
      getPosts() {
        _g.showLoading('职位加载中');
        const that = this
        that.apiPost('admin/post/getAllPosts').then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                res = JSON.parse(res)
            }
            if (res.code != 200) {
                that.handleError(res)
            } else {
                if(res.data.isSuccess === 0){
                    that.posList = res.data.posList
                }else if(res.data.isSuccess === 1){
                    _g.toastMsg("error", res.message)
                }else if(res.data.isSuccess === 2){                                     //  未设置职位
                    _g.toastMsg("error", res.message)
                    that.$router.push('/admin/position/add')
                }
            }
        })
      },

      /* 根据用户id查询用户最新的通过审核的部门与职位 */
      queryLastDapartAndPos() {
        _g.showLoading('信息加载中');
        const that = this
        const userId = that.userId
        that.apiPost('admin/resume/queryLastDapartAndPos',{userId}).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                res = JSON.parse(res)
            }
            if (res.code != 200) {
                that.handleError(res)
            } else {
                if(res.data.isSuccess === 0){
                    if(res.data.postTransferOkList !== null){    //  如果有审核通过的调岗记录
                        that.incumInfo.posName = res.data.postTransferOkList.postNew.pos_name
                        that.incumInfo.depart = res.data.postTransferOkList.departNew.depart_name
                        that.incumInfo.posId = res.data.postTransferOkList.new_post_id
                        that.incumInfo.departId = res.data.postTransferOkList.new_depart_id
                    }else{
                        that.incumInfo.posName = res.data.userBaseInfo.post.pos_name
                        that.incumInfo.depart = res.data.userBaseInfo.depart.depart_name
                        that.incumInfo.posId = res.data.userBaseInfo.pos_id
                        that.incumInfo.departId = res.data.userBaseInfo.depart_id
                    }
                }else if(res.data.isSuccess === 1){
                    _g.toastMsg("error", res.message)
                }
            }
        })
      },

      /* 获取人员基本信息及对应的部门及对应的职位 */
       getUser(){
           _g.showLoading('人员基本信息加载中');
        const that = this
        const id = that.form.id
        let len = 0

        that.apiPost('admin/users/read',{id}).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                res = JSON.parse(res)
            }
            if (res.code != 200) {
                that.handleError(res)
            } else {
                if(res.data.isSuccess === 0){
                    
                    // 页面初始化数据
                    that.form.staffNum = res.data.staffnum
                    that.form.posId = res.data.pos_id
                    that.form.departId = res.data.depart_id


                }else if(res.data.isSuccess === 1){
                    _g.toastMsg("error", res.message)
                }
            }
        })
       },

       /* **********下面为履历************** */
        
    /* 通过身份证号计算出生年月 */
    changeUserBirth(){
        let userCardNo = this.baseMsgFrm.userCardNo
        if(userCardNo === '' || !validateCardNo(userCardNo)){                               //..如果身份证号验证没有通过
            this.baseMsgFrm.userBirth = ''
            return
        }else{
            this.baseMsgFrm.userBirth = userCardNo.substr(6,4) + '-'  + userCardNo.substr(10,2) + '-' +  userCardNo.substr(12,2)
        }
    },

    /* 取消裁剪 */
    cancelCubeImg(){
        this.isShowCropper = false
    },
    /* 上传简历文件之前 */
    beforeUploadFile(file){
        const fileSize = file.size / 1024 / 1024                                              //  换选成M
        let formData = new FormData()
         if(file.type !== 'application/pdf' && file.type !== 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' && file.type !== 'application/msword'){
               _g.toastMsg("warning", '只能上传doc、docx、pdf文件!')
               return
          }
        if(fileSize > 1){                                                                             //  如果超过1M
            _g.toastMsg("warning", '文件不能超过1M!')
               return
        }
        this.tmpFileName = file.name

        formData.append('file',file)
        formData.append('oldFileName',this.oldFileName)
        this.resumeFile = formData

        return false
    },
      //阻止upload的自己上传，进行再操作
      beforeupload(file) {
          const that = this
          let reader = null
          
          if(file.type !== 'image/jpeg' && file.type !== 'image/png'){
               _g.toastMsg("warning", '只能上传jpg、jpeg、png图片!')
               return
          }  

         reader = new FileReader()
                reader.readAsDataURL(file)
                reader.onloadend = function () {
                    that.isShowCropper = true                                                       //  显示图片裁剪
                    that.option.img = this.result                                                       //  把图片加载进入图片裁剪框
            }  

        return false
      },
      
      /* 裁剪图片 */
      onCubeImg(){
          this.$refs.cropper.getCropData((data) => {
            let img = new Image(),that = this
            img.src = data
            img.onload = function() {
                let blob = dataURItoBlob(data)

                let fileSize = blob.size
                if(fileSize / 1024 > 500){                                          //  图片不能超过500k
                    _g.toastMsg("warning", '图片不能超过500k!')
                    return
                }

                let formData = new FormData()
                formData.append("file", blob,'tem.jpg')
                formData.append("oldPhotoName", that.oldPhotoName)
                formData.append("userId", that.userId)
                that.paramFile = formData
                that.imageUrl = data                                                            //  渲染图片
            }
            this.isShowCropper = false                                                  //  关闭裁剪框
            })
      },
      
      /* 上传人员大头照 */
      submitPhoto(){
        const that = this

        that.$confirm('是否确认上传图片?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
              }).then(() => {
                  _g.showLoading('上传中')
                that.apiPostFile('admin/resume/uploadUserPhoto', that.paramFile).then((res) => {
                    _g.showLoading().close()
                    if(typeof res === 'string'){
                        res = JSON.parse(res)
                    }
                    if (res.code != 200) {
                        that.handleError(res)
                    } else {
                        if(res.data.isSuccess === 0){
                            _g.toastMsg("success", res.message)

                            // 重置
                            that.paramFile = null
                            that.imageUrl = res.data.imgUrl                                //  渲染图片
                            that.oldPhotoName = res.data.photoName              //  已经上传的图片名
                        }else if(res.data.isSuccess === 1){
                            _g.toastMsg("error", res.message)
                        }
                    }
                })
            }).catch(() => {})
      },

    /* 简历文件选择改变 */
    handleChange(file, fileList){
        let arr = []
        arr.push({name : file.name})
        this.fileList = arr
    },

      /* 上传当前人员简历 */
      submitFile(){
        const that = this
        that.$confirm('是否确认上传简历?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
            }).then(() => {
                _g.showLoading('上传中')
                that.apiPostFile('admin/resume/uploadResumeFile', that.resumeFile).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                        res = JSON.parse(res)
                    }
                    if (res.code != 200) {
                        that.handleError(res)
                    } else {
                        if(res.data.isSuccess === 0){
                            _g.toastMsg("success", res.message)

                            // 重置
                            this.resumeFile = null                                                                  //  确保每次只上传一份文件
                            that.oldFileName = res.data.resumeFileName              //  已经上传的图片名
                        }else if(res.data.isSuccess === 1){
                            _g.toastMsg("error", res.message)
                        }
                    }
            })
        }).catch(() => {})
      },

    /* 在职信息开始 */
    /* 取消修改人员工号 */
    cancelChangeStaffNum(){
        this.isShowStaffNumInput = false
        this.incumInfo.staffNum = this.incumInfo.oldStaffNum
        this.isIncumInfoOk = false
    },
    /* 确认修改工号 */
    updateStaffNum(){
        const that = this
        const userId = that.userId
        const staffNum = that.incumInfo.staffNum

          let data = {
              staffNum,
              userId
          }
          that.$refs['incumInfo'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认修改工号?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/users/updateStaffNum',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    that.isIncumInfoOk = false

                                    that.isShowStaffNumInput = false
                                    that.incumInfo.oldStaffNum = staffNum

                                    // 本地存储工号
                                    Cookies.set('staffNum',staffNum)
                                    that.$store.dispatch('setUserStaffNum',staffNum)
                                }else if(res.data.isSuccess === 1 || res.data.isSuccess === 3){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isShowStaffNumInput = false
                                    that.isIncumInfoOk = false
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
    },
    /* 在职信息结束 */

      /* 提交用户履历基本信息 */

      /* 取消修改基本信息 */
      cancelEditBaseMsg(){
        const that = this
        that.isBaseFrmShow = false	
        that.baseMsgFrm = Object.assign({}, that.oldBaseMsgFrm)
        that.isBaseMsgFrmOk = false
      },
      submitBaseMsg(){
          const that = this
          const userId = that.userId
          let data = {
              ...that.baseMsgFrm,
              userId
          }
          that.$refs['baseMsgFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认提交基本信息?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/addmsg1',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)

                                    that.isBaseMsgFrmOk = false

                                    // 本地存储用户名
                                    Cookies.set('userName',data.userName)
                                    that.$store.dispatch('setUserName',data.userName)

                                    that.isBaseFrmShow = false

                                    // if(that.baseMsgFrm.existWorkingAge !== ''){
                                    //     that.baseMsgFrm.totalWorkingTime = parseInt(that.baseMsgFrm.existWorkingAge) + parseInt(that.baseMsgFrm.comSocialSec) + parseInt(that.baseMsgFrm.comWorkingTime)
                                    // }
                                    that.oldBaseMsgFrm = Object.assign({}, that.baseMsgFrm)
                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isBaseFrmShow = false
                                    that.isBaseMsgFrmOk = false
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },

      /* 取消修改公积金与社保 */
      cancelFundSocial(){
        const that = this
        that.isFundSocialFrmShow = false	
        that.fundSocialFrm = Object.assign({}, that.oldFundSocialFrm)
        that.isFundSocialFrmOk = false
      },
      submitFundSocial(){
          const that = this
          const userId = that.userId
          let data = {
              ...that.fundSocialFrm,
              userId
          }
          that.$refs['fundSocialFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认提交?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/addFundAndWorkingAge',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)

                                    that.isFundSocialFrmOk = false

                                    that.isFundSocialFrmShow = false

                                    if(that.fundSocialFrm.existWorkingAge !== ''){
                                        that.fundSocialFrm.totalWorkingTime = parseInt(that.fundSocialFrm.existWorkingAge) + parseInt(that.fundSocialFrm.comSocialSec) + parseInt(that.fundSocialFrm.comWorkingTime)
                                    }
                                    that.oldFundSocialFrm = Object.assign({}, that.fundSocialFrm)
                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isFundSocialFrmShow = false
                                    that.isFundSocialFrmOk = false
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },
      
      /* 取消新增或编辑紧急联系人 */
      cancel(){
          this.isMemberFrmShow = false
          this.memberFrm.memberCall = ''
          this.memberFrm.memberName = ''
          this.memberFrm.memberTel = ''
          this.isMemberFrmOk = false
          this.$refs.memberFrm.resetFields()
      },

    /* 显示新增紧急联系人表单 */
    showMemberFrm(){
        const that = this
        that.isMemberFrmShow = true
        that.isAddorEdit = true                             //  确认提交按钮
    },

     /* 新增紧急联系人 */
      addMember(){
          const that = this
          const data = that.memberFrm
          data.userId = that.userId
          that.$refs['memberFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认新增?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        // that.apiPost('/admin/resume/addMember',that.memberFrm).then((res) => {
                        that.apiPost('/admin/resume/addMember',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)

                                    that.memberList.push({
                                        memberCall : data.memberCall,
                                        memberName : data.memberName,
                                        memberTel : data.memberTel,
                                        memberId : res.data.id
                                    })
                                    that.isMemberFrmShow = false                                //  隐藏表单

                                    // 重置表单
                                    that.memberFrm.memberCall = ''
                                    that.memberFrm.memberName = ''
                                    that.memberFrm.memberTel = ''

                                    that.isMemberFrmOk = false
                                    that.$refs.memberFrm.resetFields()

                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },

    /* 编辑紧急联系人 */  
      editShowMemberFrm(memberId,index){
        const that = this
        that.isMemberFrmShow = true                           //  显示表单
        that.isAddorEdit = false                                      //  修改按钮
        that.memberFrm.memberCall = that.memberList[index].memberCall
        that.memberFrm.memberName = that.memberList[index].memberName
        that.memberFrm.memberTel = that.memberList[index].memberTel

        // 当前被编辑的紧急联系人
        that.currEditorMember.memberId = memberId
        that.currEditorMember.index = index
      },

    /* 显示新增教育经历表单 */
    showEduFrm(){
        const that = this
        that.isEduFrmShow = true
        that.isAddorEditEduBtn = true                             //  确认提交按钮
    },

     /* 取消新增或编辑教育经历 */
      cancelEduFrm(){
          this.isEduFrmOk = false
        this.$refs.eduFrm.resetFields()

          this.isEduFrmShow = false
          this.eduFrm.education = 6
          this.eduFrm.gradSchool = ''
          this.eduFrm.gradTime = ''
          this.eduFrm.professName = ''
      },

       /* 编辑人员教育经历 */  
      editShowEduFrm(eduId,index){
        const that = this
        that.isEduFrmShow = true                           //  显示表单
        that.isAddorEditEduBtn = false                                      //  修改按钮
        that.eduFrm.education = that.eduList[index].education
        that.eduFrm.gradSchool = that.eduList[index].gradSchool
        that.eduFrm.gradTime = that.eduList[index].gradTime
        that.eduFrm.professName = that.eduList[index].professName
        // 当前被编辑的紧急联系人
        that.currEditorEdu.eduId = eduId
        that.currEditorEdu.index = index
      },

     /* 新增教育经历 */
      addEdu(){
          const that = this
          const data = that.eduFrm
          const userId = that.userId
          data.userId = userId
          that.$refs['eduFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认新增?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/addEduExper',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)

                                    that.eduList.push({
                                        education : data.education,
                                        gradSchool : data.gradSchool,
                                        gradTime : data.gradTime,
                                        professName : data.professName,
                                        auditStatus : 1,                                                //  待审核
                                        auditFailReason : '/',
                                        eduId : res.data.eduId
                                    })
                                    that.sortAscByEducation()                               //  根据学历排序

                                    that.isEduFrmShow = false                                //  隐藏表单

                                    // 重置表单
                                    that.eduFrm.education = 6
                                    that.eduFrm.gradSchool = ''
                                    that.eduFrm.gradTime = ''
                                    that.eduFrm.professName = ''

                                    that.isEduFrmOk = false
                                    that.$refs.eduFrm.resetFields()

                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },

      /* 删除人员教育经历 */  
      deleteEdu(eduId,index){
        const that = this
        that.$confirm('是否确认删除?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
            center: true
        }).then(() => {
                _g.showLoading('删除中')
                that.apiPost('/admin/resume/deleteEduExper',{eduId}).then((res) => {
                    _g.showLoading().close()
                    if(typeof res === 'string'){
                            res = JSON.parse(res)
                        }
                        if (res.code != 200) {
                            that.handleError(res)
                        } else {
                            if(res.data.isSuccess === 0){
                                _g.toastMsg("success", res.message)
                                that.eduList.splice(index,1)

                            }else if(res.data.isSuccess === 1){
                                _g.toastMsg("error", res.message)
                            }
                        }
            })
        }).catch(() => {})
      },

      /* 确认编辑人员教育经历 */
      editEdu(){
          const that = this
          const eduId = that.currEditorEdu.eduId
           const index = that.currEditorEdu.index
          let data = {
              ...that.eduFrm,
              eduId
          }
          that.$refs['eduFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认修改人员教育经历?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/editEduExper',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)

                                    data.auditStatus = 1
                                    data.auditFailReason = '/'
                                     that.eduList.splice(index,1,data)

                                    that.sortAscByEducation()                               //  根据学历排序

                                    that.isEduFrmShow = false                                //  隐藏表单

                                    // 重置
                                    that.eduFrm.education = ''
                                    that.eduFrm.gradSchool = ''
                                    that.eduFrm.gradTime = ''
                                    that.eduFrm.professName = ''

                                    that.currEditorEdu.eduId = null
                                    that.currEditorEdu.index = null

                                    that.isEduFrmOk = false
                                    that.$refs.eduFrm.resetFields()
                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isEduFrmShow = false

                                     that.isEduFrmOk = false
                                    that.$refs.eduFrm.resetFields()
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },
    
    /* 审核人员教育经历 */
    examineEdu(eduId,index){
        this.eduDialogVisible = true                                                //  显示教育经历审核

        this.currExamineEdu.eduId = eduId
        this.currExamineEdu.index = index

    },

    /* 取消审核人员教育经历 */
    cancelExamineEdu(){
        this.eduDialogVisible = false                                                //  隐藏教育经历审核
        this.auditStatus = 2                                                                //  重置审核
        this.auditFailReason = ''
        // 重置
         this.currExamineEdu.eduId = null
        this.currExamineEdu.index = null
    },

    /* 确认审核人员教育经历 */
    sureExamineEdu(){
        const that = this
        const auditStatus = that.auditStatus
        const auditFailReason = that.auditFailReason
        const eduId = that.currExamineEdu.eduId
        const index = that.currExamineEdu.index
        const userId = that.userId
        if(auditStatus === 3 && auditFailReason === ''){
            return
        }

        _g.showLoading('提交中')
        let data = {
            userId,
            eduId,
            auditStatus,
            auditFailReason : auditFailReason === '' ? null :   auditFailReason
        }

        that.apiPost('/admin/resume/examineEduExper',data).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){
                        _g.toastMsg("success", res.message)
                        that.eduList[index].auditStatus = auditStatus
                        that.eduList[index].auditFailReason = auditFailReason || '/'

                        // 重置
                        that.cancelExamineEdu()
                    }else if(res.data.isSuccess === 1){
                        _g.toastMsg("error", res.message)
                    }
                }
        })
    },

      /* 根据教育经历学历升排序 */
      sortAscByEducation(){
        let sortEduList = this.eduList
        sortEduList.sort(function(obj1,obj2){
        let val1 = obj1.education
        let val2 = obj2.education
        if (val1 < val2) {
            return -1;
        } else if (val1 > val2) {
            return 1;
        } else {
            return 0;
        }   
        });
        this.eduList = sortEduList
      },

     /* 确认修改紧急联系人 */
      editMember(){
          const that = this
         
          const memberId = that.currEditorMember.memberId
          const index = that.currEditorMember.index
          
           let data = {
               memberId,
               memberCall :  that.memberFrm.memberCall,
               memberName : that.memberFrm.memberName,
               memberTel : that.memberFrm.memberTel
          }

          that.$refs['memberFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认修改?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/editMember',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)



                                    that.memberList.splice(index,1,data)

                                    that.isMemberFrmShow = false                                //  隐藏表单

                                    // 重置
                                    that.memberFrm.memberCall = ''
                                    that.memberFrm.memberName = ''
                                    that.memberFrm.memberTel = ''
                                    that.currEditorMember.memberId = null
                                    that.currEditorMember.index = null

                                    that.isMemberFrmOk = false                               
                                    that.$refs.memberFrm.resetFields()

                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isMemberFrmShow = false                                //  隐藏表单
                                    that.isMemberFrmOk = false                               
                                    that.$refs.memberFrm.resetFields()
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },

      /* 删除紧急联系人 */  
      deleteMember(memberId,index){
        const that = this
        that.$confirm('是否确认删除?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
            center: true
        }).then(() => {
                _g.showLoading('删除中')
                that.apiPost('/admin/resume/deleteMember',{memberId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                        res = JSON.parse(res)
                    }
                    if (res.code != 200) {
                        that.handleError(res)
                    } else {
                        if(res.data.isSuccess === 0){
                            _g.toastMsg("success", res.message)
                            that.memberList.splice(index,1)

                        }else if(res.data.isSuccess === 1){
                            _g.toastMsg("error", res.message)
                        }
                    }
            })
        }).catch(() => {})
      },
      
      /* 显示新增奖惩记录表单 */
    showRewardFrm(){
        this.isRewardFrmShow = true
        this.isAddorEditRewardBtn = true                             //  确认提交按钮
    },

     /* 取消新增或编辑奖惩记录 */
      cancelRewardFrm(){
          this.isRewardFrmShow = false
          this.rewardFrm.rewardsType = 1                        //  奖惩类型默认为奖励
          this.rewardFrm.rewardsTime = ''                       //  奖惩日期(年月日)
          this.rewardFrm.rewardsMoney = 0                     //  奖惩金额默认为0
          this.rewardFrm.rewardsReason = ''                     //  奖惩原因
          this.rewardFrm.fileNum = ''                     //  文件编号

          this.isRewardFrmOk = false
          this.$refs.rewardFrm.resetFields()
      },

       /* 编辑人员奖惩记录 */  
      editShowRewardFrm(rewardId,index){
        const that = this
        that.isRewardFrmShow = true                           //  显示表单
        that.isAddorEditRewardBtn = false                                      //  修改按钮
        that.rewardFrm.rewardsType = that.rewardList[index].rewardsType
        that.rewardFrm.rewardsTime = that.rewardList[index].rewardsTime
        that.rewardFrm.rewardsMoney = that.rewardList[index].rewardsMoney
        that.rewardFrm.rewardsReason = that.rewardList[index].rewardsReason
        that.rewardFrm.fileNum = that.rewardList[index].fileNum
        //  当前需要编辑的奖惩记录
        that.currEditorReward.rewardId = rewardId
        that.currEditorReward.index = index
      },

     /* 新增人员奖惩记录 */
      addReward(){
          const that = this
          const data = that.rewardFrm
          const userId = that.userId
          data.userId = userId
          that.$refs['rewardFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认新增?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/addReward',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    that.rewardList.push({
                                        rewardsType : data.rewardsType,
                                        rewardsTime : data.rewardsTime,
                                        rewardsMoney : data.rewardsMoney,
                                        rewardsReason : data.rewardsReason,
                                        fileNum : data.fileNum,
                                        auditStatus : 1,                                                //  待审核
                                        auditFailReason : '/',
                                        rewardId : res.data.rewardId
                                    })
                                    
                                    that.sortAscByRewardTime()                          //  奖惩日期升排序

                                    that.isRewardFrmShow = false                                //  隐藏表单

                                    // 重置表单
                                    that.rewardFrm.rewardsType = 6
                                    that.rewardFrm.rewardsTime = ''
                                    that.rewardFrm.rewardsMoney = ''
                                    that.rewardFrm.rewardsReason = ''
                                    that.rewardFrm.fileNum = ''

                                    that.isRewardFrmOk = false
                                    that.$refs.rewardFrm.resetFields()

                                }else if(res.data.isSuccess === 1 || res.data.isSuccess === 2){
                                    _g.toastMsg("error", res.message)
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },

      /* 删除人员奖惩记录 */  
      deleteReward(rewardId,index){
        const that = this
        that.$confirm('是否确认删除?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
            center: true
        }).then(() => {
                _g.showLoading('删除中')
                that.apiPost('/admin/resume/deleteReward',{rewardId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                        res = JSON.parse(res)
                    }
                    if (res.code != 200) {
                        that.handleError(res)
                    } else {
                        if(res.data.isSuccess === 0){
                            _g.toastMsg("success", res.message)
                            that.rewardList.splice(index,1)

                        }else if(res.data.isSuccess === 1){
                            _g.toastMsg("error", res.message)
                        }
                    }
            })
        }).catch(() => {})
      },

      /* 编辑人员奖惩记录 */
      editReward(){
          const that = this
          const rewardId = that.currEditorReward.rewardId
           const index = that.currEditorReward.index
          let data = {
              ...that.rewardFrm,
              rewardId
          }
          that.$refs['rewardFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认修改人员奖惩记录?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/editReward',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    data.auditStatus = 1
                                    data.auditFailReason = '/'
                                     that.rewardList.splice(index,1,data)

                                    that.sortAscByRewardTime()                          //  奖惩日期升排序

                                    that.isRewardFrmShow = false                                //  隐藏表单

                                    // 重置
                                    that.rewardFrm.rewardsType = 1
                                    that.rewardFrm.rewardsTime = ''
                                    that.rewardFrm.rewardsMoney = 0
                                    that.rewardFrm.rewardsReason = ''
                                    that.rewardFrm.fileNum = ''

                                    that.currEditorReward.rewardId = null
                                    that.currEditorReward.index = null

                                    that.isRewardFrmOk = false
                                    that.$refs.rewardFrm.resetFields()
                                }else if(res.data.isSuccess === 1 || res.data.isSuccess === 3){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isRewardFrmShow = false

                                    that.isRewardFrmOk = false
                                    that.$refs.rewardFrm.resetFields()
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },
    
    /* 审核人员奖惩记录 */
    examineReward(rewardId,index){
        this.rewardDialogVisible = true                                                //  显示奖惩记录审核弹框

        this.currExamineReward.rewardId = rewardId
        this.currExamineReward.index = index

    },

    /* 取消审核人员奖惩记录 */
    cancelExamineReward(){
        this.rewardDialogVisible = false                                                //  隐藏奖惩记录审核弹框
        this.rewardAuditStatus = 2                                                                //  重置审核
        this.rewardsReason = ''
        // 重置
         this.currExamineReward.rewardId = null
        this.currExamineEdu.index = null
    },

    /* 确认审核人员奖惩记录 */
    sureExamineReward(){
        const that = this
        const rewardAuditStatus = that.rewardAuditStatus
        const rewardAuditReason = that.rewardsReason
        const rewardId = that.currExamineReward.rewardId
        const index = that.currExamineReward.index

        if(rewardAuditStatus === 3 && rewardAuditReason === ''){
            return
        }

        _g.showLoading('提交中')
        let data = {
            rewardId,
            rewardAuditStatus,
            rewardAuditReason
        }

        that.apiPost('/admin/resume/examineReward',data).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){
                        _g.toastMsg("success", res.message)
                        that.rewardList[index].auditStatus = rewardAuditStatus
                        that.rewardList[index].auditFailReason = rewardAuditReason || '/'

                        // 重置
                        that.cancelExamineReward()
                    }else if(res.data.isSuccess === 1){
                        _g.toastMsg("error", res.message)
                    }
                }
        })
    },

      /* 根据奖惩记录 - 奖惩日期升排序 */
      sortAscByRewardTime(){
        let sortRewardList = this.rewardList
        sortRewardList.sort(function(obj1,obj2){
        let val1 = new Date(obj1.rewardsTime).getTime()
        let val2 = new Date(obj2.rewardsTime).getTime()
        if (val1 < val2) {
            return -1;
        } else if (val1 > val2) {
            return 1;
        } else {
            return 0;
        }   
        });
        this.rewardList = sortRewardList
      },

      
        /* 根据调岗记录 调岗时间升排序 */
      sortAscByPostAdjustTime(){
        let sortPostTransList = this.postTransList
        sortPostTransList.sort(function(obj1,obj2){
        let val1 = new Date(obj1.postAdjustTime).getTime()
        let val2 = new Date(obj2.postAdjustTime).getTime()
        if (val1 < val2) {
            return -1;
        } else if (val1 > val2) {
            return 1;
        } else {
            return 0;
        }   
        });
        this.postTransList = sortPostTransList
      },

      /* 下拉框选择新职位改变事件 */
      selNewPos(){
          const posList = this.posList
          const currPosId = this.postTransFrm.newPostId
          let currPosName = ''
        //   根据职位id，查找职位名字
          for(let item of posList){
              if(item.id === currPosId){
                  currPosName = item.pos_name
                  break
              }
          }
          this.postTransFrm.newPostName = currPosName
          this.watchFrmChange('postTransFrm')
      },

      /* 下拉框选择新部门改变事件 */
      selNewDepart(){
          const departs = this.departs
          const currDepartId = this.postTransFrm.newDepartId
          let currDepartName = ''
        //   根据部门id，查找部门名字
          for(let item of departs){
              if(item.id === currDepartId){
                  currDepartName = item.depart_name
                  break
              }
          }
          this.postTransFrm.newDepartName = currDepartName

          this.watchFrmChange('postTransFrm')
      },

    /* 显示新增调岗记录表单 */
    showPostTransFrm(){
        _g.showLoading('信息加载中');
        const that = this
        const userId = that.userId
        that.apiPost('admin/resume/queryLastDapartAndPos',{userId}).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                res = JSON.parse(res)
            }
            if (res.code != 200) {
                that.handleError(res)
            } else {
                if(res.data.isSuccess === 0){
                    that.departsAndposts = res.data

                    if(res.data.postTransferOkList !== null){    //  如果有审核通过的调岗记录
                        that.postTransFrm.oldPostName = res.data.postTransferOkList.new_read_only_post_name                       //   原来职位
                        that.postTransFrm.oldDepartName = res.data.postTransferOkList.new_read_only_depart_name                     //   原来部门
                        
                    }else{
                        that.postTransFrm.oldPostName = res.data.userBaseInfo.post.pos_name                       //   原来职位
                        that.postTransFrm.oldDepartName = res.data.userBaseInfo.depart.depart_name                     //   原来部门
                    }

                    that.isPostTransFrmShow = true
                    that.isAddorEditPostTransBtn = true                             //  确认提交按钮

                }else if(res.data.isSuccess === 1){
                    _g.toastMsg("error", res.message)
                    that.cancelPostTransFrm()
                }
            }
        })
    },

     /* 取消新增或编辑调岗记录 */
      cancelPostTransFrm(){
        this.isPostTransFrmShow = false
        this.postTransFrm.postAdjustTime = ''                        //   调岗时间（精确到年月日）
        this.postTransFrm.newPostId = null                     //   新的职位id
        this.postTransFrm.newDepartId = null                        //   新的部门id
        this.postTransFrm.oldPostName = ''                       //   原来职位
        this.postTransFrm.newPostName = ''                     //   新的职位
        this.postTransFrm.oldDepartName = ''                     //   原来部门
        this.postTransFrm.newDepartName = ''                     //   新的部门
        this.postTransFrm.postAdjustReason = ''                     //   调岗原因
        this.postTransFrm.fileNum = ''                     //   文件编号
        this.postTransFrm.postAdjustNum = ''                     //   调岗编号

        this.isPostTransFrmOk = false
        this.$refs.postTransFrm.resetFields()
      },

       /* 编辑人员调岗记录 */  
      editShowPostTransFrm(postTransId,index){
        const that = this
        that.isPostTransFrmShow = true                           //  显示表单
        that.isAddorEditPostTransBtn = false                                      //  修改按钮
        that.postTransFrm.postAdjustTime = that.postTransList[index].postAdjustTime
        that.postTransFrm.newPostId = that.postTransList[index].newPostId
        that.postTransFrm.newDepartId = that.postTransList[index].newDepartId
        that.postTransFrm.oldPostName = that.postTransList[index].oldPostName
        that.postTransFrm.newPostName = that.postTransList[index].newPostName
        that.postTransFrm.oldDepartName = that.postTransList[index].oldDepartName
        that.postTransFrm.newDepartName = that.postTransList[index].newDepartName
        that.postTransFrm.postAdjustReason = that.postTransList[index].postAdjustReason
        that.postTransFrm.fileNum = that.postTransList[index].fileNum
        that.postTransFrm.postAdjustNum = that.postTransList[index].postAdjustNum
        //  当前需要编辑的调岗记录
        that.currEditorPostTrans.postTransId = postTransId
        that.currEditorPostTrans.index = index
      },

     /* 新增人员调岗记录 */
      addPostTrans(){
          const that = this
          const data = that.postTransFrm
          const userId = that.userId
          data.userId = userId
          
          if(data.oldDepartName === data.newDepartName && data.oldPostName === data.newPostName){
              _g.toastMsg('warning', '新老部门或新老职位必须有一个不同')
              return
          }
          
          that.$refs['postTransFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认新增?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/addPostTrans',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    that.postTransList.push({
                                        postAdjustTime : data.postAdjustTime,
                                        newPostId : data.newPostId,
                                        newDepartId : data.newDepartId,
                                        oldPostName : data.oldPostName,
                                        newPostName : data.newPostName,
                                        oldDepartName : data.oldDepartName,
                                        newDepartName : data.newDepartName,
                                        postAdjustReason : data.postAdjustReason,
                                        fileNum : data.fileNum,
                                        postAdjustNum : data.postAdjustNum,
                                        auditStatus : 1,                                                //  待审核
                                        auditFailReason : '/',
                                        postTransId : res.data.postTransId
                                    })
                                    
                                    that.sortAscByPostAdjustTime()                  //  根据调岗日期排序

                                    that.isPostTransFrmShow = false                                //  隐藏表单

                                    // 重置表单
                                    that.cancelPostTransFrm()

                                    that.isPostTransFrmOk = false
                                    that.$refs.postTransFrm.resetFields()
                                }else if(res.data.isSuccess === 1 || res.data.isSuccess === 2 || res.data.isSuccess === 3){
                                    _g.toastMsg("error", res.message)
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },

      /* 删除人员调岗记录 */  
      deletePostTrans(postTransId,index){
        const that = this
        that.$confirm('是否确认删除?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
            center: true
        }).then(() => {
                _g.showLoading('删除中')
                that.apiPost('/admin/resume/deletePostTrans',{postTransId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                        res = JSON.parse(res)
                    }
                    if (res.code != 200) {
                        that.handleError(res)
                    } else {
                        if(res.data.isSuccess === 0){
                            _g.toastMsg("success", res.message)
                            that.postTransList.splice(index,1)

                        }else if(res.data.isSuccess === 1){
                            _g.toastMsg("error", res.message)
                        }
                    }
            })
        }).catch(() => {})
      },

      /* 确认编辑人员调岗记录 */
      editPostTrans(){
          const that = this
          const postTransId = that.currEditorPostTrans.postTransId
           const index = that.currEditorPostTrans.index
           const userId = that.userId
          let data = {
              ...that.postTransFrm,
              postTransId,
              userId
          }

          that.$refs['postTransFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认修改人员调岗记录?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/editPostTrans',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    data.auditStatus = 1
                                    data.auditFailReason = '/'
                                     that.postTransList.splice(index,1,data)

                                    that.sortAscByPostAdjustTime()                                      //  根据调岗日期排序

                                    that.isPostTransFrmShow = false                                //  隐藏表单

                                    // 重置
                                    that.cancelPostTransFrm()
                                    that.currEditorPostTrans.postTransId = null
                                    that.currEditorPostTrans.index = null

                                    that.isPostTransFrmOk = false
                                    that.$refs.postTransFrm.resetFields()
                                }else if(res.data.isSuccess === 1 || res.data.isSuccess === 3 || res.data.isSuccess === 4){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isPostTransFrmShow = false

                                    that.isPostTransFrmOk = false
                                    that.$refs.postTransFrm.resetFields()
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },
    
    /* 审核人员调岗记录 */
    examinePostTrans(postTransId,index){
        this.postTransDialogVisible = true                                                //  显示调岗记录审核弹框

        this.currExaminePostTrans.postTransId = postTransId
        this.currExaminePostTrans.index = index

    },

    /* 取消审核人员调岗记录 */
    cancelExaminePostTrans(){
        this.postTransDialogVisible = false                                                //  隐藏调岗记录审核弹框
        this.postTransAuditStatus = 2                                                                //  重置审核
        this.postAdjustReason = ''
        // 重置
         this.currExaminePostTrans.postTransId = null
        this.currExaminePostTrans.index = null
    },

    /* 确认审核人员调岗记录 */
    sureExaminePostTrans(){
        const that = this
        const postTransAuditStatus = that.postTransAuditStatus
        const postAdjustReason = that.postAdjustReason
        const postTransId = that.currExaminePostTrans.postTransId
        const index = that.currExaminePostTrans.index

        const userId = that.userId

        if(postTransAuditStatus === 3 && postAdjustReason === ''){
            return
        }

        _g.showLoading('提交中')
        let data = {
            userId,
            postTransId,
            postTransAuditStatus,
            postAdjustReason,
            oldPostName:that.postTransList[index].oldPostName,//    原职位名字
            newPostName:that.postTransList[index].newPostName,//新职位名字
            oldDepartName:that.postTransList[index].oldDepartName,//原部门名字
            newDepartName:that.postTransList[index].newDepartName//新部门名字
        }

        that.apiPost('/admin/resume/examinePostTrans',data).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){
                        _g.toastMsg("success", res.message)
                        that.postTransList[index].auditStatus = postTransAuditStatus
                        that.postTransList[index].auditFailReason = postAdjustReason || '/'

                        // 重置
                        that.cancelExaminePostTrans()

                        // 根据用户id查询用户最新的部门与职位
                        _g.showLoading('信息加载中');
        
                        that.apiPost('admin/resume/queryLastDapartAndPos',{userId}).then((res) => {
                            _g.showLoading().close()
                            if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    that.departsAndposts = res.data

                                    if(data.postTransAuditStatus === 2){    //  如果审核通过
                                        that.incumInfo.depart = res.data.postTransferOkList.departNew.depart_name                      
                                        that.incumInfo.posName = res.data.postTransferOkList.postNew.pos_name                       
                                        that.incumInfo.departId = res.data.postTransferOkList.new_depart_id                      
                                        that.incumInfo.posId = res.data.postTransferOkList.new_post_id                     
                                    }
                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }
                            }
                        })

                    }else if(res.data.isSuccess === 1){
                        _g.toastMsg("error", res.message)
                    }
                }
        })
    },
    
    /* 显示新增人员状态记录表单 */
    showUserStatusFrm(){
        this.isUserStatusFrmShow = true
        this.isAddorEditUserStatusBtn = true                             //  确认提交按钮
    },

     /* 取消新增或编辑状态记录 */
      cancelUserStatusFrm(){
        this.isUserStatusFrmShow = false
        this.userStatusFrm.workNature = 1                        //    工作状态，默认在职

        this.userStatusFrm.eventTime = ''                     //    工作状态开始时间
        this.userStatusFrm.endEventTime = ''                     //    工作状态结束时间

        this.isUserStatusFrmOk = false
        this.$refs.userStatusFrm.resetFields()
      },

       /* 编辑人员状态记录 */  
      editShowUserStatusFrm(userStatusId,index){
        const that = this
        that.isUserStatusFrmShow = true                           //  显示表单
        that.isAddorEditUserStatusBtn = false                                      //  修改按钮
        that.userStatusFrm.workNature = that.userStatusList[index].workNature
        that.userStatusFrm.eventTime = that.userStatusList[index].eventTime
        that.userStatusFrm.endEventTime = that.userStatusList[index].endEventTime === '/' ? '' : that.userStatusList[index].endEventTime
        //  当前需要编辑的状态记录
        that.currEditorUserStatus.userStatusId = userStatusId
        that.currEditorUserStatus.index = index
      },

     /* 新增人员状态记录 */
      addUserStatus (){
        const that = this
        const data = that.userStatusFrm
        const userId = that.userId
        data.userId = userId

        if(data.workNature ===5 || data.workNature ===7){//   如果为无固定期限合同或离职，则结束时间置null
            data.endEventTime = '/'
        }

        that.$refs['userStatusFrm'].validate(valid => {
            if (valid) {
                that.$confirm('是否确认新增?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning',
                    center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/addUserStatus',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    that.userStatusList.push({
                                        workNature : data.workNature,
                                        eventTime : data.eventTime,
                                        endEventTime : data.endEventTime,
                                        auditStatus : 1,                                                //  待审核
                                        auditFailReason : '/',
                                        userStatusId : res.data.userStatusId
                                    })
                                    
                                    that.sortAscByEventTime()                  //  根据工作状态开始时间排序

                                    that.isUserStatusFrmShow = false                                //  隐藏表单

                                    // 重置表单
                                    that.cancelUserStatusFrm()

                                    that.isUserStatusFrmOk = false
                                    that.$refs.userStatusFrm.resetFields()

                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }
                            }
                    })
                }).catch(() => {})
            }
        })
      },

      /* 删除人员状态记录 */  
      deleteUserStatus(userStatusId,index){
        const that = this
        that.$confirm('是否确认删除?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
            center: true
        }).then(() => {
                _g.showLoading('删除中')
                that.apiPost('/admin/resume/deleteUserStatus',{userStatusId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                        res = JSON.parse(res)
                    }
                    if (res.code != 200) {
                        that.handleError(res)
                    } else {
                        if(res.data.isSuccess === 0){
                            _g.toastMsg("success", res.message)
                            that.userStatusList.splice(index,1)

                        }else if(res.data.isSuccess === 1){
                            _g.toastMsg("error", res.message)
                        }
                    }
            })
        }).catch(() => {})
      },

      /* 确认编辑人员状态记录 */
      editUserStatus(){
          const that = this
          const userStatusId = that.currEditorUserStatus.userStatusId
           const index = that.currEditorUserStatus.index
           const userId = that.userId
          let data = {
              ...that.userStatusFrm,
              userStatusId,
              userId
          }
          if(data.workNature === 5 || data.workNature === 7){
              data.endEventTime = '/'
          }
          that.$refs['userStatusFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认修改人员状态记录?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/editUserStatus',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    data.auditStatus = 1
                                    data.auditFailReason = '/'

                                     that.userStatusList.splice(index,1,data)

                                    that.sortAscByEventTime()                                      //  根据工作状态变更开始日期排序

                                    // 重置
                                    that.cancelUserStatusFrm()
                                    that.currEditorUserStatus.userStatusId = null
                                    that.currEditorUserStatus.index = null

                                    that.isUserStatusFrmOk = false
                                    that.$refs.userStatusFrm.resetFields()
                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }else if(res.data.isSuccess === 2){
                                    _g.toastMsg("warning", res.message)
                                    that.isUserStatusFrmShow = false

                                    that.isUserStatusFrmOk = false
                                    that.$refs.userStatusFrm.resetFields()
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },
    
    /* 审核人员状态记录 */
    examineUserStatus(userStatusId,index){
        this.userStatusDialogVisible = true                                                //  显示状态记录审核弹框

        this.currExamineUserStatus.userStatusId = userStatusId
        this.currExamineUserStatus.index = index

    },

    /* 取消审核人员状态记录 */
    cancelExamineUserStatus(){
        this.userStatusDialogVisible = false                                                //  隐藏状态记录审核弹框
        this.userStatusAuditStatus = 2                                                                //  重置审核
        this.userStatusAdjustReason = ''
        // 重置
         this.currExamineUserStatus.userStatusId = null
        this.currExamineUserStatus.index = null
    },

    /* 确认审核人员状态记录 */
    sureExamineUserStatus(){
        const that = this
        const userStatusAuditStatus = that.userStatusAuditStatus
        const userStatusAdjustReason = that.userStatusAdjustReason
        const userStatusId = that.currExamineUserStatus.userStatusId
        const index = that.currExamineUserStatus.index

        if(userStatusAuditStatus === 3 && userStatusAdjustReason === ''){
            return
        }

        _g.showLoading('提交中')
        let data = {
            userStatusId,
            userStatusAuditStatus,
            userStatusAdjustReason
        }

        that.apiPost('/admin/resume/examineUserStatus',data).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){
                        _g.toastMsg("success", res.message)
                        that.userStatusList[index].auditStatus = userStatusAuditStatus
                        that.userStatusList[index].auditFailReason = userStatusAdjustReason || '/'

                        // 重置
                        that.cancelExamineUserStatus()
                    }else if(res.data.isSuccess === 1){
                        _g.toastMsg("error", res.message)
                    }
                }
        })
    },

       /* 根据工作状态开始时间 升排序 */
      sortAscByEventTime(){

        let sortUserStatusList = this.userStatusList
        sortUserStatusList.sort(function(obj1,obj2){
        let val1 = new Date(obj1.eventTime).getTime()
        let val2 = new Date(obj2.eventTime).getTime()
        if (val1 < val2) {
            return -1;
        } else if (val1 > val2) {
            return 1;
        } else {
            return 0;
        }   
        });
        this.userStatusList = sortUserStatusList
      },

      /* 显示新增职业等级记录表单 */
    showOccGradeFrm(){
        this.isOccGradeFrmShow = true
        this.isAddorEditOccGradeBtn = true                             //  确认提交按钮
    },

     /* 取消新增或编辑职业等级记录 */
      cancelOccGradeFrm(){
        this.isOccGradeFrmShow = false
        this.occGradeFrm.occGradeStr =  ''                        //     职业等级
        this.occGradeFrm.eventTime = ''                     //    工作状态开始时间
        // this.occGradeFrm.editReason = ''                     //    修改原因

        this.isOccGradeFrmOk = false
        this.$refs.occGradeFrm.resetFields()
      },

       /* 编辑职业等级记录 */  
      editShowOccGradeFrm(occGradeId,index){
        const that = this
        that.isOccGradeFrmShow = true                           //  显示表单
        that.isAddorEditOccGradeBtn = false                                      //  修改按钮
        that.occGradeFrm.occGradeStr = that.occGradeList[index].occGradeStr
        that.occGradeFrm.eventTime = that.occGradeList[index].eventTime
        //  当前需要编辑的职业等级记录
        that.currEditorOccGrade.occGradeId = occGradeId
        that.currEditorOccGrade.index = index
      },

     /* 新增人员职业等级 */
      addUserOccGrade (){
          const that = this
          const data = that.occGradeFrm
          const userId = that.userId
          data.userId = userId
          
          that.$refs['occGradeFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认新增?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/addUserOccGrade',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                                res = JSON.parse(res)
                            }
                            if (res.code != 200) {
                                that.handleError(res)
                            } else {
                                if(res.data.isSuccess === 0){
                                    _g.toastMsg("success", res.message)
                                    that.occGradeList.push({
                                        occGradeStr : data.occGradeStr,
                                        eventTime : data.eventTime,
                                        auditStatus : 1,                                                //  待审核
                                        auditFailReason : '/',
                                        occGradeId : res.data.occGradeId
                                    })
                                    
                                    that.sortAscByOccGradeEventTime()                  //  根据开始时间排序

                                    that.isOccGradeFrmShow = false                                //  隐藏表单

                                    // 重置表单
                                    that.cancelOccGradeFrm()

                                    that.isOccGradeFrmOk = false
                                    that.$refs.occGradeFrm.resetFields()

                                }else if(res.data.isSuccess === 1){
                                    _g.toastMsg("error", res.message)
                                }
                            }
                    })
                }).catch(() => {})
              }
          })
      },

      /* 删除人员职业等级 */  
      deleteUserOccGrade(occGradeId,index){
        const that = this
        that.$confirm('是否确认删除?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning',
            center: true
        }).then(() => {
                _g.showLoading('删除中')
                that.apiPost('/admin/resume/deleteUserOccGrade',{occGradeId}).then((res) => {
                _g.showLoading().close()
                if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){
                        _g.toastMsg("success", res.message)
                        that.occGradeList.splice(index,1)

                    }else if(res.data.isSuccess === 1){
                        _g.toastMsg("error", res.message)
                    }
                }
            })
        }).catch(() => {})
      },

      /* 确认编辑人员职业等级 */
      editUserOccGrade(){
          const that = this
          const occGradeId = that.currEditorOccGrade.occGradeId
           const index = that.currEditorOccGrade.index
           const userId = that.userId
          let data = {
              ...that.occGradeFrm,
              occGradeId,
              userId
          }

          that.$refs['occGradeFrm'].validate(valid => {
              if (valid) {
                that.$confirm('是否确认修改人员职业等级记录?', '提示', {
                  confirmButtonText: '确定',
                  cancelButtonText: '取消',
                  type: 'warning',
                  center: true
                }).then(() => {
                        _g.showLoading('提交中')
                        that.apiPost('/admin/resume/editUserOccGrade',data).then((res) => {
                        _g.showLoading().close()
                        if(typeof res === 'string'){
                            res = JSON.parse(res)
                        }
                        if (res.code != 200) {
                            that.handleError(res)
                        } else {
                            if(res.data.isSuccess === 0){
                                _g.toastMsg("success", res.message)
                                data.auditStatus = 1
                                data.auditFailReason = '/'

                                that.occGradeList.splice(index,1,data)

                                that.sortAscByOccGradeEventTime()                                      //  根据变更日期排序

                                // 重置
                                that.cancelOccGradeFrm()
                                that.currEditorOccGrade.userStatusId = null
                                that.currEditorOccGrade.index = null

                                that.isOccGradeFrmOk = false
                                that.$refs.occGradeFrm.resetFields()
                            }else if(res.data.isSuccess === 1){
                                _g.toastMsg("error", res.message)
                            }else if(res.data.isSuccess === 2){
                                _g.toastMsg("warning", res.message)
                                that.isOccGradeFrmShow = false

                                that.isOccGradeFrmOk = false
                                that.$refs.occGradeFrm.resetFields()
                            }
                        }
                    })
                }).catch(() => {})
              }
          })
      },
    
    /* 审核人员职业等级记录 */
    examineUserOccGrade(occGradeId,index){
        this.occGradeDialogVisible = true                                                //  显示职业等级记录审核弹框

        this.currExamineOccGrade.occGradeId = occGradeId
        this.currExamineOccGrade.index = index

    },

    /* 取消审核职业等级记录 */
    cancelExamineOccGrade(){
        this.occGradeDialogVisible = false                                                //  隐藏职业等级审核弹框
        this.occGradeAuditStatus = 2                                                                //  重置审核
        this.occGradeAdjustReason = ''
        // 重置
         this.currExamineOccGrade.occGradeId = null
        this.currExamineOccGrade.index = null
    },

    /* 确认审核职业等级记录 */
    sureExamineOccGrade(){
        const that = this
        const occGradeAuditStatus = that.occGradeAuditStatus
        const occGradeAdjustReason = that.occGradeAdjustReason
        const occGradeId = that.currExamineOccGrade.occGradeId
        const index = that.currExamineOccGrade.index

        if(occGradeAuditStatus === 3 && occGradeAdjustReason === ''){
            return
        }

        _g.showLoading('提交中')
        let data = {
            occGradeId,
            occGradeAuditStatus,
            occGradeAdjustReason
        }

        that.apiPost('/admin/resume/examineUserOccGrade',data).then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                    res = JSON.parse(res)
                }
                if (res.code != 200) {
                    that.handleError(res)
                } else {
                    if(res.data.isSuccess === 0){
                        _g.toastMsg("success", res.message)
                        that.occGradeList[index].auditStatus = occGradeAuditStatus
                        that.occGradeList[index].auditFailReason = occGradeAdjustReason || '/'

                        // 重置
                        that.cancelExamineOccGrade()
                    }else if(res.data.isSuccess === 1){
                        _g.toastMsg("error", res.message)
                    }
                }
        })
    },

       /* 根据职业等级记录开始时间 升排序 */
      sortAscByOccGradeEventTime(){

        let sortOccGradeList = this.occGradeList
        sortOccGradeList.sort(function(obj1,obj2){
            let val1 = new Date(obj1.eventTime).getTime()
            let val2 = new Date(obj2.eventTime).getTime()
            if (val1 < val2) {
                return -1;
            } else if (val1 > val2) {
                return 1;
            } else {
                return 0;
            }   
        });
        this.occGradeList = sortOccGradeList
      },

      /* 获取所有职位 */
      getPosts() {
        _g.showLoading('职位加载中');
        const that = this
        that.apiPost('admin/post/getAllPosts').then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                res = JSON.parse(res)
            }
            if (res.code != 200) {
                that.handleError(res)
            } else {
                if(res.data.isSuccess === 0){
                    that.posList = res.data.posList
                }else if(res.data.isSuccess === 1){
                    _g.toastMsg("error", res.message)
                }else if(res.data.isSuccess === 2){                                     //  未设置职位
                    _g.toastMsg("error", res.message)
                    that.$router.push('/admin/position/add')
                }
            }
        })
      },

      /* 获取所有部门 */
      getDeparts() {
        _g.showLoading('部门加载中');
        const that = this
        that.apiPost('admin/addDepart').then((res) => {
            _g.showLoading().close()
            if(typeof res === 'string'){
                res = JSON.parse(res)
            }
            if (res.code != 200) {
                that.handleError(res)
            } else {
                if(res.data.isSuccess === 0){
                    that.departs = res.data.departList
                }else if(res.data.isSuccess === 1){
                    _g.toastMsg("error", res.message)
                }else if(res.data.isSuccess === 2){                                         //  未设置部门
                    _g.toastMsg("error", res.message)
                    that.$router.push('/admin/structures/addDepart')
                }
            }
        })
      },

    },
    created() {
        const id = this.$route.query.id
        const userPromise = this.$route.query.userPromise

        if(id){                                                     //  如果为编辑用户 
            this.form.id = id
            this.userPromise = this.$route.query.userPromise

            this.getUser(id)

            if(userPromise == 1){
                this.userId = id  //  用户id
                // this.getUserResume()
                // this.queryLastDapartAndPos()
                this.addResumeAction = config.HOST  + 'admin/resume/uploadUserPic/type/1/userId/' + id
                this.cardNumAction = config.HOST  + 'admin/resume/uploadUserPic/type/2/userId/' + id
                this.cerAction = config.HOST  + 'admin/resume/uploadUserPic/type/3/userId/' + id
                this.leavingAction = config.HOST  + 'admin/resume/uploadUserPic/type/4/userId/' + id
                this.rewardAction = config.HOST  + 'admin/resume/uploadUserPic/type/5/userId/' + id
                this.eduCerAction = config.HOST  + 'admin/resume/uploadUserPic/type/6/userId/' + id
                this.bankCardAction = config.HOST  + 'admin/resume/uploadUserPic/type/7/userId/' + id
                this.driverAction = config.HOST  + 'admin/resume/uploadUserPic/type/8/userId/' + id
                this.drivingAction = config.HOST  + 'admin/resume/uploadUserPic/type/9/userId/' + id
                this.trafficAction = config.HOST  + 'admin/resume/uploadUserPic/type/10/userId/' + id
                this.commercialAction = config.HOST  + 'admin/resume/uploadUserPic/type/11/userId/' + id

                this.getUserPhoto()//   默认加载大头照片
            }
            
        }

        this.userPromise = userPromise

        this.getDeparts()
        this.getPosts()

    },
    mixins: [http]
  }
</script>

<style scoped>
.avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }
  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 178px;
    height: 178px;
    line-height: 178px;
    text-align: center;

    border: 1px dashed #8c939d;
  }
  .avatar {
    width: 178px;
    height: 178px;
    display: block;
    border: 1px dashed #8c939d;
  }

  /* 填写履历信息 */
h3{
    font-size: 14px;
    color: #ef8200;
    padding-bottom: 10px;
}

.line{
    height: 2px;
    background-color: #ef8200;
}

.addResumeWrapper{
    /* width: 1000px; */
    margin: 20px auto;
    /* border: 1px solid #d1d1d1; */
    padding: 0 20px 20px 20px;
} 

.btnGroup{
    position: absolute;
    bottom: 20px;
}
</style>
